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

Hello Hamed!
Thank you so much for your reply. It has been very useful and I have been adapting the template StandingModel.Main.any for the thoracic flexible AND scoliosis! Now at least for that standing model, I can get the loads for the lumbar and thoracic regions.

I wanted to clarify some information, please. When declaring the DriverPos, DriverPos = { 0, 0, 0} is the order defined for {flexion/extension, rotation, lateral}? Initially, I defined my angles in that order, changing mostly in the lateral direction; however, instead of changing the curvature leftward or rightward (looking from the back), I modified the kyphosis/lordosis angulation. I want to be sure to modify the angles properly.

Last question... I know there are some entrances related to the Abdominal volumes in the model. But it is still not clear to me what those volumes represent. In the screenshot, I am attaching, for example, What does the Abdominal Volume represent? Also, for the Diaphragm, is there any information related to the lung/breathing capacity that we can extract?

image

As always thank you for your help! :slight_smile:

Hello Maria,

That is great that your model worked :slight_smile:

Regarding the first question: You can check the axes in your measure that is driven. In the figure below you can see the Axis1, Axis2, and Axis3 in a rotational measure.

Regarding the second question, the volume is a measure defined using multiple nodes on the 8th, 9th, and 10th ribs and is used to constrain the diaphragm segments :slight_smile: You can see it below. However, you cannot use it for any pressure purposes.
image

If you want to see the pressure in abdominal layers, you can check it in PressureActuators. The volume measures are defined in the file named Volumes.
image

There is ThoracicCavity volume in the tree as well, which is the volume inside the ribcage. However, the pressure actuator in this volume is OFF by default and will not make pressure. This means that the force from abdominal pressure will be handles by the diaphragm compeletely. But if you add an actuator (similar to the abdominal volumes) to have pressure values in the thoracic cavity, some of the pressure will be transfered to the thoracic cavity and the rest is balanced by diaphragm :slight_smile:

And there is nothing defined as lungs in the model yet :slight_smile:

BR,
Hamed

1 Like