segment weight in AnyForceMomentMeasure2

Deal all,

additionally to the muscle forces, I would like to consider the weight of the segment shank while using the class AnyForceMomentMeasure2 to measure the forces applied on one node of the segment.
I’m working with the model GaitFullBody.

In order to calculate the weight of the shank, I tried the Following code in the study InverseDynamicStudy:

AnyVar Lower_leg_masse = BodyModel.Right.Leg.Seg.Shank.Mass;
AnyForce3D SegmentWeight = {
RefFrames = .BodyModel.Right.Leg.Seg.Shank.sCoM;
F = .Lower_leg_masse * .Gravity;
};

I received the following error message: " Shank.sCoM : argument will not be ready for evaluation until moment ‘DesignVar’ "

Can anyone help me?
Thanks in advance!

Cheers,

Arnaud

Dear Arnaud,

basically this error message is saying that object you are using as AnyRefFrame will be evaluated after the value is needed. The AnyRefFrame used in an AnyForce3D needs to have the evaluation moment of a const, see Reference Manual, which is not given for the sCom, which you can find in the object description in the ModelTree.

Have you considered using the AnyForceMomentMeasure2 for your calculations? This measure has the option to consider the gravitational forces as well (switch IncludeGravity).

Best regards
Daniel

Hi Daniel,

thank you for your answer!
I wanted to use the calculated weight as AnyForceBase in the AnyForceMomentMeasure2.
But you are right switching IncludeGravity should be the best way to do it.
Thank You!

Cheers,

Arnaud