add a force to leg39 model
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
add a force to leg39 model
I have some questions:
How can I add a force?
How can I give to the force the attack points to the bone?
How can I say to the force to move during the simulation?
How can I add a force?
How can I give to the force the attack points to the bone?
How can I say to the force to move during the simulation?
- Amy Stalker
- Posts: 15
- Joined: Thu May 22, 2008 12:27 pm
RE: add a force to leg39 model
I don't know if this is the only way but how I have learned how to apply a force to the heel of the foot (in my leg press simulation) is the following. The data I had was only angle data so I am not sure how much this would change if you have marker data.
1. Alter the .mot file to create the motion you want. I based mine off of one of the example gait motions from a tutorial for walking with the gait2392.osim model.
2. Under the tools - analyze menu, analysis tab, I clicked "add" and chose "point kinematics." Unfortunately, now I cannot figure out exactly how I got the result. I somehow chose to track the position of the left and right calcaneus. When the analysis was performed, the result was 3 .sto files, which gave position, velocity, and acceleration of the heels.
3. I then modified the motion file I had to include the force that was applied in columns entitled ground_force_vx, vy, and vz for both feet. I then added the points that the force was applied to, the points of the heals, in columns entitled ground_force_px,py, and pz.
4. Then inverse dynamics or static optimization analyses can be performed to calculate joint forces or muscle forces respectively. When it asks for the motion you can select "motion, from file" and pick your motion file. When it asks for a force to apply you can pick the file of just the time, forces, and positions of application of those forces, which you will have to create.
If this is incorrect or if there is a better way, please, someone on the forum feel free to correct me, as I would like to learn how to do a static optimization analysis properly.
Francesco, I hope that is helpful and not too confusing.
-Amy
1. Alter the .mot file to create the motion you want. I based mine off of one of the example gait motions from a tutorial for walking with the gait2392.osim model.
2. Under the tools - analyze menu, analysis tab, I clicked "add" and chose "point kinematics." Unfortunately, now I cannot figure out exactly how I got the result. I somehow chose to track the position of the left and right calcaneus. When the analysis was performed, the result was 3 .sto files, which gave position, velocity, and acceleration of the heels.
3. I then modified the motion file I had to include the force that was applied in columns entitled ground_force_vx, vy, and vz for both feet. I then added the points that the force was applied to, the points of the heals, in columns entitled ground_force_px,py, and pz.
4. Then inverse dynamics or static optimization analyses can be performed to calculate joint forces or muscle forces respectively. When it asks for the motion you can select "motion, from file" and pick your motion file. When it asks for a force to apply you can pick the file of just the time, forces, and positions of application of those forces, which you will have to create.
If this is incorrect or if there is a better way, please, someone on the forum feel free to correct me, as I would like to learn how to do a static optimization analysis properly.
Francesco, I hope that is helpful and not too confusing.
-Amy
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: add a force to leg39 model
you are more advanced user than me! I think that you gave me a great idea to build the coordinates of the force starting from marker. thanks
I'll try monday your suggestions, I'll keep you update.
Do you know how is it possible determine the ligament reactions? I think that these parameters are very important also for your simulation (leg press). I understood that is possible to develop a plug-in in c++ to simulate ligaments, but to me seems very complicated. do you have any idea?
I'll try monday your suggestions, I'll keep you update.
Do you know how is it possible determine the ligament reactions? I think that these parameters are very important also for your simulation (leg press). I understood that is possible to develop a plug-in in c++ to simulate ligaments, but to me seems very complicated. do you have any idea?
- Amy Stalker
- Posts: 15
- Joined: Thu May 22, 2008 12:27 pm
RE: add a force to leg39 model
Francesco,
I wish I were a more advanced user... I am sorry I do not know about ligament reactions or developing plugins. They sound complicated to me too. Now it's killing me that I cannot figure out how I did the point kinematics to track the piont on the heel - I will need to try it again. Would you let me know if you get it to work?
Thanks,
Amy
I wish I were a more advanced user... I am sorry I do not know about ligament reactions or developing plugins. They sound complicated to me too. Now it's killing me that I cannot figure out how I did the point kinematics to track the piont on the heel - I will need to try it again. Would you let me know if you get it to work?
Thanks,
Amy
- Ayman Habib
- Posts: 2248
- Joined: Fri Apr 01, 2005 12:24 pm
RE: add a force to leg39 model
Amy & Francesco,
While running a Forward Simulation or CMC you can attach a PointKinematics analysis to it and it will write out the coordinates of the point of interest to a file.
The GUI does not allow you to do that directly, however if you run the Analyze Tool using the motion resulting from your simulation you can add the PointKinematics analysis form the "Tools/Analyze.../Analysis/Add>"
Hope this helps,
-Ayman
While running a Forward Simulation or CMC you can attach a PointKinematics analysis to it and it will write out the coordinates of the point of interest to a file.
The GUI does not allow you to do that directly, however if you run the Analyze Tool using the motion resulting from your simulation you can add the PointKinematics analysis form the "Tools/Analyze.../Analysis/Add>"
Hope this helps,
-Ayman
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: add a force to leg39 model
about pointkiematic practically are you saying to attach a marker where I want to put a force?
is it right?
If I write pointkinematics I did't find anything on the opensim user's guide.
Thanks Ayman
Regards
Franesco
is it right?
If I write pointkinematics I did't find anything on the opensim user's guide.
Thanks Ayman
Regards
Franesco
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: add a force to leg39 model
sorry I found pointkinematics in analyze tool, but my problem is giving the right kinematics, because I don't have marker data.
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: leg 39 folder
there two files very similar (for me are same)
controls.xml and controls_off.xml.
When I used them on the forward dynamic simulation I didn't see any difference.
I opened in XML and they seem the same.
what is the difference?
controls.xml and controls_off.xml.
When I used them on the forward dynamic simulation I didn't see any difference.
I opened in XML and they seem the same.
what is the difference?
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: add a force to leg39 model
when I go in analyze menu how can say to pointkinematics to connect this point to the bone. I'm gone on edit but it's impossible to modify something. I need to work more on it to understand it.
- Francesco Mastrandrea
- Posts: 18
- Joined: Mon May 25, 2009 9:00 am
RE: add a force to leg39 model
I didn't found a right example to modify the coordinates, but I can take a generic one and set the final angle that I want in the knee and then make an interpolation in according to the time. What can I do for the other body coordinates (calcaneus, toe, etc...)? do I still apply interpolation?
I tried also to obtain something from CMC but there is something wrong in the default setting because the simulation stop and I receive a wrong message.
I tried also to obtain something from CMC but there is something wrong in the default setting because the simulation stop and I receive a wrong message.