Go Back   Forums > Professional Forum > Debug model


Thread Tools Display Modes
Old 10-30-2018, 04:02 PM
ogrodnikj's Avatar
ogrodnikj ogrodnikj is offline
Junior Member
Join Date: Mar 2015
Posts: 16
Default Translation between two segments

I use AnyBody version and "Plug-in-gait_Simple" model.

I woudl like to calculate the translation between A) head of the femur and acetabulum, and between B) shank and femur.
Firstly I try do it for hip joint (A), and I changed the definition of "hip joint" use TransSphericalJoint function (instead SphericalJoint). However I coudn't perform the Inverse dynamics.
Firstly I saw error:

ERROR(SCR.EXP0) : C:/U..s/J..a/D..p/N..)/A..o/Body/A..n/L..M/RightLegSelectedOutput.any(12) : 'Hip_MediolateralForce' : Error in expression. Please refer to the following error messages for details ...
ERROR(SCR.EXP3) : C:/U..s/J..a/D..p/N..)/A..o/Body/A..n/L..M/RightLegSelectedOutput.any(12) : 'Hip_MediolateralForce' : Index [2] out of range for 'AnyFloat[2]'

So, I bocked of code "Hip_MediolateralForce" (in SelectedOutput folder) into a comment. In this way two steps: LoadParameters and MarkerTracking in operation "RunAnalysis" were completed successfully. However "InverseDynamics" wasn't completed and I saw comment:

#### Macro command : InverseDynamicView(1:1)> classoperation Main.ModelSetup.Views.InverseDynamicView"Set View"
Position analysis failed : 194 independent constraints and 196 unknowns
- attemps to continue (attempt no. 1)
Position analysis failed : 194 independent constraints and 196 unknowns
- attemps to continue (attempt no. 2)
Velocity and acceleration analysis failed : 166 independent constraints and 168 unknowns
Constraint violations for study 'Main.Studies.InverseDynamicStudy' :
ERROR(OBJ.MCH.KIN1) : C:/U..s/J..a/D..p/N..)/A..o/T..s/A..p/AnyMoCapModel.any(59) : InverseDynamicStudy.InitialConditions : Model is kinematically indeterminate :

1. Could you help me, where is the problem in my model?
2. How should I change the definition of
(A) hip joint and (B)knee joint to calculate the translation between head of the femur and acetabulum and between femur and shank, respectively (in x, y, z direction).

Thank you very much for your help.
Best regards,
Reply With Quote
Old 11-07-2018, 12:20 PM
mkjung9980's Avatar
mkjung9980 mkjung9980 is offline
Senior Member
Join Date: Aug 2009
Posts: 893

Dear Justyna,

There may be two different ways to achieve what you want to implement.

1) Changing the types of the hip and the knee joints:
If you changed the joint type as you want, then also you need to adjust the following two files in your AnyMoCap model base folder:
Because you should also write the translations of those joints in the output files. Then you can read those values for inverse dynamics.

2) Using FDK feature.
This will be more challenging. Sometimes you need to model some relevant ligaments around the knee joint as well as some proper contacts.

For hip, I would recommend you to see the 'THA-KneeBendDemo' model in the Examples folder of the AMMR.
For knee, I would recommend you to have a look at this paper:

Best regards,

Moon Ki Jung, Ph.D, Application Engineer, AnyBody Technology A/S.

※ AnyScript™ Reference Manual is the bible.
※ AnyScript™ wiki page is the best supplementary information(
※ When you would upload your models, please write information about your AMS and AMMR versions.
※ If you want to get more intensive support, please update your information(profile, organization and signature).
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 07:51 AM.