Page 2 of 2

RE: Foot model

Posted: Wed Apr 16, 2008 1:50 am
by fristoker
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

RE: Foot model

Posted: Wed Apr 16, 2008 8:10 am
by aymanh
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


RE: Foot model

Posted: Thu Apr 29, 2010 2:33 am
by jjmordang
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

RE: Foot model

Posted: Thu Apr 29, 2010 8:11 am
by danielleib
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

RE: Foot model

Posted: Wed May 19, 2010 9:29 am
by jjmordang
Thank you very much Dan!

It really helped me.

Cheers,

RE: Foot model

Posted: Mon May 24, 2010 8:52 am
by jjmordang
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