add a force to leg39 model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
arun ramakrishnan
Posts: 8
Joined: Sat Nov 15, 2008 6:46 pm

RE: add a force to leg39 model

Post by arun ramakrishnan » Mon Jun 15, 2009 7:45 am

i like the way you described the procedure. i still am missing a few details.
i tried point kinematics by fixing markers using the GUI. it worked and i got the marker trajectories (position, velocity and acceleration) of each marker in separate files.
but i still have problems adding force to my model.
i had a degree/radian conversion issue earlier with my .sto and .mot files (weird i would say).
still wouldnt help with force application.

User avatar
Amy Stalker
Posts: 15
Joined: Thu May 22, 2008 12:27 pm

RE: add a force to leg39 model

Post by Amy Stalker » Mon Jun 15, 2009 2:41 pm

To apply the force, I created a file with 19 columns (at least it was for me - based off of the gait2392), with columns for time, ground force x,y,z for right foot, position of force application x,y,z for right foot, and then the same data for the left foot. Then there were 6 columns for ground torque for each foot, x,y, and z. Then I referred to that force file when doing the inverse dynamics or static optimization tool, under the external loads tab. The kinematics for external loads were the information I needed for the skeleton to move in my .mot file, plus the 18 columns (time was already included) with the forces and positions mentioned above.

User avatar
Amy Stalker
Posts: 15
Joined: Thu May 22, 2008 12:27 pm

RE: add a force to leg39 model

Post by Amy Stalker » Thu Mar 11, 2010 1:39 pm

Francesco,
Did you get your leg39 model to work? I am now trying a leg extension using leg39, and though it looks like I can attach a force to the talus, I cannot get inverse dynamics or static optimization to work. It looks like the problem may be that the joints listed in the user interface are different than the joints in the .osim file. I just wondered if you got your simulation to work. I know it has been a while...
Thank you!
Amy

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

RE: add a force to leg39 model

Post by Ayman Habib » Thu Mar 11, 2010 1:52 pm

Amy,
What do you mean by the joints in the GUI and the .osim files are different? The GUI loads the osim file and displays info from it in the navigator and other windows, can you explain?

-Ayman

User avatar
Amy Stalker
Posts: 15
Joined: Thu May 22, 2008 12:27 pm

RE: add a force to leg39 model

Post by Amy Stalker » Thu Mar 11, 2010 2:11 pm

Ayman,
The GUI had under the coordinates tab for leg39:
pelvis_tilt,
hip_angle_r,
knee_angle_r,
ankle_angle_r,
subtalar_angle_r,
mtp_angle_r.
I made these my column headers in my .mot file. When I went to try the inverse dynamics analysis, it said "Tool execution failed or cancelled by user. Output files were not written." Under the Messages, it said:
1.9.1\examples\Leg39_Amy_modified\legextension_motion_forces.mot (nr=49 nc=17)
Model::formCompleteStorages(): WARNING- Did not find column tib_tx_r in storage object.
Model::formCompleteStorages(): WARNING- Did not find column tib_ty_r in storage object.
Model::formCompleteStorages(): WARNING- Did not find column pat_angle_r in storage object.
Model::formCompleteStorages(): WARNING- Did not find column pat_tx_r in storage object.
Model::formCompleteStorages(): WARNING- Did not find column pat_ty_r in storage object.
Found 49 state vectors with time stamps ranging from 0 to 1.6016.
Running analyze tool leg39.

Then I saw the .osim file had the tib_tx_r, etc.
I guess I am not sure what my columns in the .mot file should be anyway. I do not have marker data but am just trying to create the motion file by changing the knee angle to make it extend. I also don't know whether to specify torque columns.

Your help is much apprecaited.
Thank you,
Amy


User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

RE: add a force to leg39 model

Post by Ayman Habib » Thu Mar 11, 2010 2:59 pm

Amy,

The coordinates referred to there in the warning are constrained coordinates so you don't need to specify them (they get computed from other coordinates in this model anyway). I don't think this explains the failure of Inverse Dynamics. I think the only thing that should cause Inverse Dynamics to fail is zero or singlar-mass matrix. Unless this's the case, please report a bug and associate your model, setup files and data files and we'll look into it.

-Ayman

User avatar
Amy Stalker
Posts: 15
Joined: Thu May 22, 2008 12:27 pm

RE: add a force to leg39 model

Post by Amy Stalker » Fri Mar 12, 2010 8:58 am

Ayman,
I reported it as a bug but could only attach one file at a time. I sent it in two parts. I hope what I sent makes sense.
It could be that I did something wrong in the column headers of the motion file or file with just the forces, but I do not know.
Thank you,
Amy

POST REPLY