AnyGait marker protocol

http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/chapX_MuscleRecruitment/Inverse_dynamics.html

especially:
http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/chapX_MuscleRecruitment/lesson2.html

Brooke,

thanks to Patrick, he is pointing into the right tutorials!

change the muscle recruitment solver type in the InverseDynamicsModel.any file at

AnyGait\AnyGaitSourceCode\Model\OptLegModel\ProjectMode

to Linear as described in the tutorial.

Additional markers can be added in the Drivers.any at

AnyGait\AnyGaitSourceCode\Model\OptLegModel\KinOptModel

Let me know if you are struggling with the new markers.

Amir,
I have had some trouble running some of my c3d files through the anygait application. It seems to be very sensitive to the motion. I continue getting the following message: ERROR(OBJ1) : C:/U…s/B…d/D…p/A…5/A…o/A…n/A…2/A…e/M…l/O…l/B…l/ModelSetup.any : DynamicDataSet.Points.Markers.LASIS.PosInterpol : Parameter has an invalid value for this interpolation; extrapolations are not allowed.

Sometimes, I can slightly reduce the number of included frames in the dynamic c3d file and it will work. However, it seems to be happening more frequently with the squat motion. I have checked and all of the markers are identified for 100% of the frames being used. Can you make any suggestions to get around this problem?

Brooke

Hello Brooke,

I looked into my models and C3D’s but could not see that error message. Can you share one or two of the C3D’s that lead to the error message?

I have attached 2 dynamic files which have given me errors. One is from gait and the other a single limb stance.

Thanks,
Brooke

I continue getting this same error. I’m still not sure why. I’ve attached another c3d file which gives me: ‘‘2.0) Kinematic analysis…
ERROR(OBJ1) : C:/U…s/B…d/D…p/A…5/A…o/A…n/A…2/A…e/M…l/O…l/B…l/ModelSetup.any : DynamicDataSet.Points.Markers.LASIS.PosInterpol : Parameter has an invalid value for this interpolation; extrapolations are not allowed.’’

Thanks,
Brooke

Hey Brooke,

about the error message:
ERROR(OBJ1) : C:/U…s/a…Y/D…p/A…5/A…n/A…e/A…e/M…l/O…l/B…l/ModelSetup.any : DynamicDataSet.Points.Markers.LASIS.PosInterpol : Parameter has an invalid value for this interpolation; extrapolations are not allowed.

It seems that this one appears always at the last frame in the C3D. Is that correct, or did that happen at random frames as well?

can you replace in the KinematicModel.any

  tStart = Main.ModelSetup.tStart;
  tEnd = Main.ModelSetup.tEnd;

with
tStart = Main.ModelSetup.tStart+2Kinematics.ApproxVelAccPerturb;
tEnd = Main.ModelSetup.tEnd-2
Kinematics.ApproxVelAccPerturb;

that should do it (did it for me)!

Hey Amir - thanks for checking into that. Can you explain what that is doing now? I also wanted to ask you about the scaling that is happening in the model. Can you give me an explanation of how the model is scaled (bone segments, muscles, strength, etc.) or direct me to where I can find that information in more detail?

Thanks,
Brooke

Amir,

I tried running the model with the change you suggested and got a new error in a different step:

Loading Main : “C:\Users\Brooke Sanford\Desktop\AMMRV1.5\AMMR.v1.5-MyDemo\Application\AnyGait2\AnyGaitSourceCode\Model\OptLegModel\ProjectModel\InverseDynamicsModel.main.any”
Scanning…
Parsing…
Constructing model tree…
Linking identifiers…
Evaluating constants…
Configuring model…
Evaluating model…
ERROR(OBJ1) : C:/U…s/B…d/D…p/A…5/A…o/A…n/A…2/A…e/M…l/O…l/L…l/JointsAndDriversOptimized.any : JntDriverPelvis : Time, ‘t’, has an invalid value for this interpolation
Model loading skipped

Hey Brooke,

sorry for the delay, did you replace the tStart and tEnd in the InverseDynamics.any as well?

Hey Amir - I changed the tstart and tend in the other places and it is running now. Can you explain what that is doing now by using the ApproxVelAccPerturb?

I also wanted to ask you about the scaling that is happening in the model. Can you give me an explanation of how the model is scaled (bone segments, muscles, strength, etc.) or direct me to where I can find that information in more detail? I believe the default scaling law is the length-mass-fat, but I had trouble finding which law is actually being used in the AnyGait model.

Thanks,
Brooke

Brooke,

there is a short paper/abstract that discusses some of that scaling:
The effect of including accurate pelvis bony landmarks in a non-linearly scaled musculoskeletal lower extremity model
Andersen M. S., Mellon S., Lund M. E.,Grammatopoulos G., Gill H. S.
if you cannot access it, can you please write to support(a)anybodytech.com, then I can send it to you.

about the ApproxVelAccPerturb:
This is something pure numerical. The kinematic solver has a numerical perturbation. You could see it as a accuracy maybe. So, if you specify time steps 1-10, in reality you might have 1+/-perturbation to 10+/-perturbation. So if you tell the model to go to step 10 and in reality there is only 9.999999999 you’ll get an error message. I think using 2*ApproxVelAccPerturb is to be on the safe side…

Hey Amir,
I have some data where the subject is squatting and the LASIS and RASIS markers drop out when the subject is at deep knee flexion. Is there some way to get around this problem in AnyBody since the gaps are too long to fill. I do have the sacrum, LPSIS, RPSIS, and iliac crest markers that could be used for the pelvis.

Brooke

Hi Brooke,

take a look into the Mannequin.any file. You will see that the ASI-Markers are used for the initial positioning of the pelvis. You can use other markers on the pelvis to replace the ASI markers in the formulas. Of course you will have to modify the existing formulas a little bit to match with the new geometry.

Regards

Patrick

I am starting to receive this error fairly often when trying to run the AnyGait application. Can you recommend something to fix this? I have beeen receiving this with multiple different subject data files and have checked to make sure that markers are not dropping out.

2.0.0.1) …Load-time positions have been re-established.
Failed to resolve kinematic constraints (final kin. error = 2.991935E+000)
Constraint no. 0 above error tolerance 0.000001, error = 0.092156. - constr. #0 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.HipJoint.Constraints’
Constraint no. 1 above error tolerance 0.000001, error = 0.198182. - constr. #1 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.HipJoint.Constraints’
Constraint no. 2 above error tolerance 0.000001, error = 0.203967. - constr. #2 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.HipJoint.Constraints’
Constraint no. 3 above error tolerance 0.000001, error = 0.041713. - constr. #0 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.KneeJoint.Constraints’
Constraint no. 4 above error tolerance 0.000001, error = 0.032728. - constr. #1 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.KneeJoint.Constraints’
Constraint no. 5 above error tolerance 0.000001, error = 0.052004. - constr. #2 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.KneeJoint.Constraints’
Constraint no. 6 above error tolerance 0.000001, error = 0.087767. - constr. #3 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.KneeJoint.Constraints’
Constraint no. 7 above error tolerance 0.000001, error = 0.694748. - constr. #4 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.KneeJoint.Constraints’
Constraint no. 8 above error tolerance 0.000001, error = 0.003591. - constr. #0 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.AnkleJoint.Constraints’
Constraint no. 9 above error tolerance 0.000001, error = 0.008010. - constr. #1 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.AnkleJoint.Constraints’
Constraint no. 10 above error tolerance 0.000001, error = 0.041907. - constr. #2 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.AnkleJoint.Constraints’
Constraint no. 11 above error tolerance 0.000001, error = 0.450729. - constr. #3 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.AnkleJoint.Constraints’
Constraint no. 12 above error tolerance 0.000001, error = 0.036763. - constr. #4 in ‘Main.JntParameterOptModel.LegModel.Right.Jnt.AnkleJoint.Constraints’
Constraint no. 13 above error tolerance 0.000001, error = 0.156441. - constr. #0 in ‘Main.JntParameterOptModel.LegModel.Left.Jnt.HipJoint.Constraints’
Constraint no. 14 above error tolerance 0.000001, error = 0.174449. - constr. #1 in ‘Main.JntParameterOptModel.LegModel.Left.Jnt.HipJoint.Constraints’
Constraint no. 15 above error tolerance 0.000001, error = 0.173665. - constr. #2 in InverseDynamicStudy.InitialConditions : Kinematic analysis failed in time step 0…

Hey Brooke,

the kinematic error seems very high, are all of the trials similar? can you upload something? Tough to judge it with the message only…

Amir, I have attached a C3d file which is producing an error.

I also have a question regarding the forces at the knee joint. It is my understanding that the force is reported as the force of the femur on the tibia in the tibial reference frame. Also, it seems as though the mediolateral force is always positive to the right whether it is a left or right knee. Am I correct in these assumptions?

Thanks,
Brooke

sorry, forgot this before hitting reply…

Brooke,

I could manage to run the C3D by changing the

AnyIntVar StaticFrameNo = 5;

in the SetupSpecificData.any file. The model will run if you use a value between 1 and 9, but will fail if you use 10 or higher… I have to admit I don’t know why yet.

About the knee loads:
I have attached a picture with the reference frames of the knee. This will show how the forces are presented.

Amir,
I am getting confusing results for the knee forces. If I go to Main.AnyBodyGaitAppModel.InverseDynamicStudy.Output.OutputFile.RightKneeForces
the forces are all positive. However, if I go to Main.AnyBodyGaitAppModel.InverseDynamicStudy.Output.HumanModel.BodyModel.Right.Leg.Jnt.Knee.Constraints.Reaction.Fout
the forces are negative.

It is my understanding that all forces and moments are acting on the second mentioned coordinate system and measure wrt to the first mentioned coordinate system in the measure.If I got to the AnyBodyGaitAppModel/BodyModel/Right/Leg/Jnt/Knee and link to the file that creates the knee joint, I find this:

AnyRevoluteJoint Knee = {
Axis = z;
AnyRefNode &ThighNode = …Seg.Thigh.KneeJoint;
AnyRefNode &ShankNode = …Seg.Shank.KneeJoint;
}; // End of knee

indicating that the femoral coordinate system is being used and the forces are acting on the tibia. However, the file
OutputDefinition.any defines
AnyFloat RightKneeForces = .JointReactionForces.RightKneeForceInShankCoordinateSystem;

This is all very confusing and hard to follow. I’m not sure which coordinate system is being used or which segment the forces are acting on in the model. Also, which place reports these forces correctly - the output file or the knee.constraints.reaction.fout???