Share 
Follow 
AboutDownloadsDocumentsForumsSource CodeIssuesNews
Date:
2011-11-14 02:05
Priority:
5
State:
Open
Submitted by:
B.J. Fregly (fregly)
Assigned to:
Ajay Seth (aseth)
Summary:
Model behavior depends on ordering of Bodies in osim file

Detailed description
We are trying to do an inverse dynamics analysis on a squat weightlifting motion and are unable to get it to work.

We started with Sam's nominal 3D OpenSim model and changed the tree structure so that the 6 DOF joint goes from the ground to the torso (at the midpoint of the shoulders) and then works down to the pelvis and legs from there. We then scaled the model so that when we run inverse kinematics on an experimentally measured squat motion, the RMS marker errors are on the order of 8 mm – not bad.

The problem comes when we try inverse dynamics. Here are the files available (all included in the attached Zip file):
FullBodyModelSquatPoseDynMarkersScaled.osim and associated bone files in the Geometry folder – the OpenSim model with markers included.
InverseKinematics_Settings.xml – inverse kinematics settings file.
SN_RN_WN.trc – experimental marker data used as inputs to inverse kinematics analysis.
SN_RN_WN_IK.mot – motion file with joint angles output by inverse kinematics analysis.
InverseDynamics_Settings.xml – inverse dynamics settings file.
SN_RN_WN_GroundReactions.mot – experimental ground reaction data used as inputs to inverse dynamics analysis.
SN_RN_WN_GroundReactions.xml – file specifying how ground reaction forces and torques are applied to calcn_r and calcn_l.
SN_RN_WN_IDData.mot – motion file with joint angles output by inverse kinematics plus experimental ground reactions for visualizing model motion and ground reactions simultaneously.

Now is a sequence of steps that demonstrate the problems that I am encountering.
1) Load the motion file SN_RN_WN_IK.mot and the model animates fine.
2) Preview Motion Data file SN_RN_WN_IDData.mot, and both ground reaction force arrows show up fine and look correct (marker data does not show up, but I am not sure if it should when ground reaction data are included as well).
3) Load the motion file SN_RN_WN_IDData.mot, which is the same motion except with the ground reactions appended to the end. Only the right ground reaction force vector shows up (the left one is missing), plus now the feet slide forward and then back unrealistically part way through the motion. So the motion is no longer consistent with the inverse kinematics results, and both ground reactions no longer display properly.
4) Finally, run an inverse dynamics analysis using SN_RN_WN_IK.mot for the motion (with or without 6 Hz filtering) and SN_RN_WN_GroundReactions.mot (with associated .xml file) for the ground reactions. While the inverse dynamics analysis is running, the model moves off the screen in a funny way, and when you look at the inverse dynamics moments for the right and left ankle, knee, and hip, they are not close to being the same on the two sides. Symmetry of the motion and ground reaction forces suggests that the two sides should produce very similar ankle, knee, and hip moments. Based on visualization of the ground reaction forces when SN_RN_WN_IDData.mot is loaded into the model, it is not clear to me that the left ground reactions are not being properly applied to the model (in fact, I created another ground reactions .mot file where I set all the left foot ground reactions to zero, and I got identical inverse dynamics results, so it appears that the model is not applying the left ground reactions properly). Also, based on visualization of the model during the inverse dynamics analysis, it is not clear to me that inverse dynamics is using the correct kinematics. Both issues could be contributing to erroneous inverse dynamics results.

Note that I am using OpenSim 2.4 on a PC with Windows XP SP3.

Add A Comment: Notepad

Message  ↓
Date: 2011-11-15 18:11
Sender: Ayman Habib

The original issue has been traced back to the ordering of bodies in the model was not such that parents appear before their children. With the reorder, IVD works properly. We still need to fix the issue with ordering or if not detect it and produce a meaningful error message describing the problem.

Attachments:
Size Name Date By Download
989 KiBFullBodyModelSquatPoseDynMarkersScaled2.osim2011-11-15 18:12aymanhFullBodyModelSquatPoseDynMarkersScaled2.osim
730 KiBSN_RN_WN_IDData2.mot2011-11-15 18:13aymanhSN_RN_WN_IDData2.mot
Field Old Value Date By
category_id3342012-01-17 18:52aymanh
assigned_toaymanh2012-01-17 18:52aymanh
File Added428: SN_RN_WN_IDData2.mot2011-11-15 18:13aymanh
File Added427: FullBodyModelSquatPoseDynMarkersScaled2.osim2011-11-15 18:12aymanh
summaryInverse Dynamics Not Working2011-11-15 18:11aymanh
Feedback