Foot model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Christopher Lee
Posts: 9
Joined: Thu Feb 14, 2008 5:55 am

RE: Foot model

Post by Christopher Lee » Wed Apr 16, 2008 1:50 am

Thanks,

Just to be sure if I understand it right. So when I am looking for example in the /examples/Gait2392_Simbody/subject01_walk1_grf.mot file.

There is in order what you have:
time
ground_force_value(3 directions Fx,Fy,Fz) for the right_foot
ground_force_point of origine(x,y,z) for the right_foot
ground_force_value(Fx,Fy,Fz)_left_foot
ground_force_point of origine(x,y,z)_left_foot
ground_torque_right_foot (same point of origine)
ground_torque_left_foot (same point of origine)

Can you tell me if this is true?







Then, I try to understand the subtalar_joint in the same example...

this is the joint in the .osim


<SimbodyJoint name="subtalar_r">
<bodies>talus_r calcn_r</bodies>
<DofSet>
<objects>
<SimbodyTranslationDof name="tx">
<Value>
<Constant>
<value>-0.048770000000</value>
</Constant>
</Value>
</SimbodyTranslationDof>
<SimbodyTranslationDof name="ty">
<Value>
<Constant>
<value>-0.041950000000</value>
</Constant>
</Value>
</SimbodyTranslationDof>
<SimbodyTranslationDof name="tz">
<Value>
<Constant>
<value>0.007920000000</value>
</Constant>
</Value>
</SimbodyTranslationDof>
<SimbodyRotationDof name="r1">
<axis>0.787179606862 0.604747457256 -0.120949491451</axis>
<coordinate>subtalar_angle_r</coordinate>
<Value>
<natCubicSpline>
<x>-6.283185307179 6.283185307179 </x>
<y>-6.283185307179 6.283185307179 </y>
</natCubicSpline>
</Value>
</SimbodyRotationDof>
<SimbodyRotationDof name="r2">
<axis>0.000000000000 1.000000000000 0.000000000000</axis>
<Value>
<Constant>
<value>0.000000000000</value>
</Constant>
</Value>
</SimbodyRotationDof>
<SimbodyRotationDof name="r3">
<axis>0.000000000000 0.000000000000 1.000000000000</axis>
<Value>
<Constant>
<value>0.000000000000</value>
</Constant>
</Value>
</SimbodyRotationDof>
</objects>
</DofSet>
</SimbodyJoint>



So basically you have one rotationDof possibility r1. How can I give a look on the axis? Is there any trick in opensim?

<axis>0.787179606862 0.604747457256 -0.120949491451</axis>


Thank you & Best regards,
Christopher

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

RE: Foot model

Post by Ayman Habib » Wed Apr 16, 2008 8:10 am

Hi Christopher,

Yes, the ordering you mentioned is correct.

There isn't an easy way to visualize the axis but you can use the coordinate viewer to get a feel for where the rotation axis is. (As a hack, you can also make up two markers, compute their location so that they're lined up with the axis and add them to the model).

Good luck,
-Ayman


User avatar
J.J. Mordang
Posts: 26
Joined: Mon Mar 22, 2010 7:04 am

RE: Foot model

Post by J.J. Mordang » Thu Apr 29, 2010 2:33 am

Dear Daniel,


For a project about the human gait concerning the foot and shank. I, just like Christopher, wanted to change the .osim file (of bothlegs) to add joints and devide the foot in more segments. Because I've nearly no experience with XML files I can't get a clue how and where I can add or delete bones and joints in the file as stated in your template. Is it because I'm using version 2.0? I'm sorry to bother you with this.


Kind Regards,

Jan-Jurre

User avatar
Daniel Leib
Posts: 75
Joined: Mon Sep 11, 2006 6:44 am

RE: Foot model

Post by Daniel Leib » Thu Apr 29, 2010 8:11 am

Hi Jan-Jurre,

The version shouldn't be an issue if you're editing bothlegs.osim. One thing that may help is using a text editor that highlights headers in an XML file with different colors. If you're already using one that does that (Notepad++, VIM, etc) but it isn't changing the font color contextually, try changing the file extension of bothlegs.osim to bothlegs.xml while you're editing it. Sometimes there are issues with recognizing file types that way.

Once you've got that working, you'll want to start near the bottom of the bothlegs file and look for pairs of tags that will read like this:

<body name="MyBoneName">
list of properties including joints
</body>

Those are the parts where the bodies, or what you might be used to calling segments, are defined.

In this format of an XML file, the open tag looks like this:

<someName>

and the close will be similar but have a slash in it:

</someName>

Commented parts have this surrounding them:

<!-- someComment -->

And usually indentation is used to match pairs, like this:

<body1 ="someBody">
body stuff
<joint1 ="someJoint">
joint stuff
<thing ="someOtherThing">
thing stuff
</thing>
</joint1>
</body1>

Once you have all that defined, then coordinates and muscles and other things are dependent on those bodies you define (and there are other interdependencies as well). Notice that some of the muscle definitions near the top of bothlegs.osim have the names of bodies that are defined near the bottom of the file in their definitions. It can get confusing early on, but once you figure out the method to how things are laid out you'll have an "Ah hah!" moment and be able to edit the files to do what you need.

Hope this helps,

Dan

User avatar
J.J. Mordang
Posts: 26
Joined: Mon Mar 22, 2010 7:04 am

RE: Foot model

Post by J.J. Mordang » Wed May 19, 2010 9:29 am

Thank you very much Dan!

It really helped me.

Cheers,

User avatar
J.J. Mordang
Posts: 26
Joined: Mon Mar 22, 2010 7:04 am

RE: Foot model

Post by J.J. Mordang » Mon May 24, 2010 8:52 am

Hi,


I made a 7 segmented foot with joints and it works. However when I want to scale it something weird happens. The lower leg looks a bit crippled and the virtual markers are not on the same places they should be. I think it has something to do with the geometric origins of the segments. Because I didn't know how to edit these some of the segments have the same geometric origins. I tested this by showing the axis of the segments, but also when I want to add a marker it can be seen that several segments have the same origin.

Is there a method to edit these origins of is the problem something completely different?


Kind regards,

Jan-Jurre

POST REPLY