Chair Jump C3d2any conversion issue

Hi Preet,

First solution is to align the thorax with the global ref, to do so remove the PostureDriver in the optimization model and replace it by something like this:

AnyKinEqSimpleDriver driver = {

AnyKinRotational rot = {
AnyRefFrame ref1 = Thorax;
AnyRefFrame ref2 = GlobalRef;
};

Pos = {0,0,0};
vel = {0,0,0};
};

Second solution is to contrain to thorax to stay above the pelvis, then remove the flexion/extension and lateral bending component of the PostureDriver and add something like this:

AnyKinEqSimpleDriver driver = {
MeasureOrganizer = {0,1}; //along x and y

AnyKinLinear lin = {
ref = -1; //measured in global
AnyRefFrame ref1 = Thorax;
AnyRefFrame ref2 = Pelvis;
};

Pos = {0,0};
vel = {0,0};
};

The syntax is not exact, but i think you get the idea. Just choose the one you think looks better.

Best regards, Sylvain.

Hello Sylvain,

Thanks for the advice. I added the second solution that you recommended but still found the same issues with my model. I was wondering if you could take a look and see where I have gone wrong. Thank you.

Best Regards,

Preet Sabharwal

Hi Preet,

I can see you copied my code directly, but as i said it was more a guideline and the syntax needs some adjustments to your model (the path for the reference to the segments). Anyway here is the code adjsuted, and don’t forget you still need to drive the trunk axial rotation:

AnyKinEqSimpleDriver PostureDriver ={
AnyKinMeasureOrg &Ref3 = …HumanModel.BodyModel.Interface.Trunk.PelvisThoraxRotation;

DriverPos = pi/180*{
.JntPos.PelvisThoraxRotation
};
DriverVel = pi/180*{
.JntVel.PelvisThoraxRotation
};
Reaction.Type = {Off};
};

AnyKinEqSimpleDriver PostureDriver2 = {
MeasureOrganizer = {0,1}; //along x and y

AnyKinLinear lin = {
Ref = -1; //measured in global
AnyRefFrame &ref1 = …HumanModel.BodyModel.Trunk.SegmentsThorax.SkullSeg;
AnyRefFrame &ref2 = …HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
};

DriverPos = {0,0};
DriverVel = {0,0};
};

I also gave a better initial position:

AnyVar PelvisRotZ = 90;
AnyVar PelvisRotY = 0;
AnyVar PelvisRotX = 90;

AnyVar PelvisPosX =0.2;// 0.25* (RASI(Main.ModelSetup.tStart)[0]+LASI(Main.ModelSetup.tStart)[0]+RPSI(Main.ModelSetup.tStart)[0]+LPSI(Main.ModelSetup.tStart)[0]);
AnyVar PelvisPosY =0.1;//  0.25* (RASI(Main.ModelSetup.tStart)[1]+LASI(Main.ModelSetup.tStart)[1]+RPSI(Main.ModelSetup.tStart)[1]+LPSI(Main.ModelSetup.tStart)[1]);
AnyVar PelvisPosZ =1;// 0.25* (RASI(Main.ModelSetup.tStart)[2]+LASI(Main.ModelSetup.tStart)[2]+RPSI(Main.ModelSetup.tStart)[2]+LPSI(Main.ModelSetup.tStart)[2]);

And i removed the +1.5 seconds you added to the tStart.

I think with this the model is doing what you want with the trunk upright above the pelvis.

Best regards, Sylvain.

Hi Sylvain,

Now I understand what you meant. My apologies. Thanks for the help. I was wondering if you could explain the trunk axial rotation. Is that done similarly to the pelvis thorax rotation. Could it be done the same way with the MeasureOrganizer = {2};

Preet

Hi Preet,

Yes what i called the trunk axial rotation is the pelvis-thorax rotation, the one you can find in the usual posture driver and in the mannequin file.

If you look in the code i sent you will see that i simply used the PostureDriver and removed the flexion extension and lateral bending from it.

Best regards, Sylvain.

Hi Sylvain,

I was wondering, you said that I still need to drive the trunk axial rotation. In the code that you sent me isn’t the trunk axial rotation being driven already? Can you clarify this for me. When I have used the codee you sent me the model is still not standing upright.

Best Regards,

Preet Sabharwal

Hi preet
Thd code sylvain sent will drive the rotation. Please specify what is the problem with the drivers
Best regards søren

Hello,

I am not sure what is still causing the model to not stand upright. Will the posture make a difference in my results for muscle forces in the legs and hips.
I have attached my model.

Preet

Hi Preet,

I have reviewed your drivers…

Since there are no markers for the upper body i have added all three rotational drivers between thorax and pelvis, otherwise the upper-body is not well controlled.

I have also switched off the optimization of the trunk height since it is not a good idea trying to optimize it while having no markers “controlling” it, this may cause convergence problems.

These changes creates a plausible motion, the one you had previously will definitely have an effect on the results since the pelvis was rotated a lot.

Please find the two changed files attached.

Best regards
Søren

Thank you Søre! I appreciate your help very much!

Preet