AMMR4 beta Kinematic analysis failed

Hello team!
I have been using the AMMR4 beta repository in AnyBody 8. I have some data in .c3d format and I am running the template "Plug-in-gait_Simple", but adding to the main the line:
#define BM_TRUNK_THORACIC_MODEL_THORACIC_MODEL_FLEXIBLE_
to activate/use the new thoracic flex model. Althought I was able to run some of the models, a couple of days ago, I keep receiving the next Error:

ERROR(OBJ.MCH.KIN3) : KinematicStudyForParameterIdentification.any(11) : KinematicStudyForParameterIdentification.Kinematics : Kinematic analysis failed in time step 8 : Position analysis is not completed
0.1.0.0.8) ...Kinematic analysis terminated

I have attached a screenshot of the full error. What is interesting is that I previously ran those same .C3D files in an older AnyBody version without issues. But now, I am not sure what I am missing when adapting or working on the AMMR4 beta.

I appreciate any suggestions about how to correct the error.
Thank you
Maria Prado.

Dear Maria,

We have a MOCAP example model for flexible thorax, which can be also used for scoliosis models. It can be found in Application\MocapExamples\Plug-in-gait_FlexibleThorax. However it need a C3D file as an input and due to data protection, we could not make our data public yet. In this model, we have excluded the arms.

But it seems that you found the example :slight_smile:
The model will work with this marker config without any change.

You can also use the old marker set (without extra markers on spine) and it will work fine. You just need some modifications:

  1. When you set the flexible_thorax, it will use the flexible thorax marker protocol. So you need to change it back to old marker protocol (in the LabSpecificData.any file).
  2. You need to exclude the arms markers in the marker protocol.

Some brief explanation of the model:
The model has Spine rhythms, which is included by BM_TRUNK_LUMBAR_RHYTHM, BM_TRUNK_THORACIC_RHYTHM, and BM_TRUNK_CERVICAL_RHYTHM that are kinematic constraints for the spine, which all of them are soft constraints to be able to solve the kinematics together with markers. That is why it can solve the spine kinematics without any markers on it. However it may be not necessary to use flexible thorax when you do not have markers on the thoracic spine and ribcage.

Further explanation if you want to use the model for scoliotic postures:
The model has all the rhythms included, albeit with a very small weight in lateral and flexion-extension directions. The reason is that the model is created for a scoliotic posture modelling, but since the single markers cannot provide axial rotation, we have to have a big enough weight in axial rotation. You can see the code in AnyMocapModel.any. However, the model also works with weight=1 for all the rhythms for healthy subjects.

Best regards,
Hamed

Hello Hamed,

Following this latest answer and one from another entrance in the forum about scoliosis, I am having some conflicts with understanding the logic of work.

I shifted OFF the lumbar and thoracic rhythms and created drivers into JointsLumbar.any and ThoraxLumbar.any, respectively. In this new driver, I assigned a position (DriverPos), an angle to generate a curvature for scoliosis. With this approach, I am not using the ScoliosisRhythmDriver.any, which is not clear to me if I should use it simultaneously and also change the angles in that AnyScript.

Also, I assumed the rib would require constraints when the rhythms are OFF. Could you please, confirm this to me? I found "RibConstraints.any" but again, I am not sure if I should create drivers here.

Any extra information would be highly appreciated.

Thanks. Maria

Hello Maria,

First of all, no change needed for the rib constraints and you do not need to change anything in the "RibConstraints.any". When you drive the spine posture, the ribcage will follow :slightly_smiling_face:
About the spine drivers, you do not need to use ScoliosisRhythmDriver.any if you define drivers for the spine joints. It is actually doing the same thing.

I think the best way is to find the Thoracic.main in the example model, remove the rhythms and add the joint drivers and make sure that the kinematics can run. Then you are ready to deal with MOCAP.

Note that what I explained in the before is that you can use the rhythms when you do not run scoliotic postures. This way, you do not need to define the joint drivers. So the only things that are needed to change to make it work are listed above. And then it should work. However, for creating scoliotic postures, it is probably better to remove the rhythms and add manual joint drivers (and the input of the driver can come from xrays or something).

Maybe, try the above-mentioned method to make it run without arms and then add the scoliotic posture by excluding the rhythms and adding new joint drivers. Then add arms :slight_smile:

I hope it helps,
Hamed