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