Segment definitions in osim file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
JunJay Tan
Posts: 1
Joined: Mon Nov 12, 2007 1:12 pm

Segment definitions in osim file

Post by JunJay Tan » Mon Jun 09, 2008 12:50 pm

Would anyone happen to know where segment lengths and origins are defined in the osim model files? I'm trying to modify segment center of mass locations, but to do this I need to know the length of each segment as well as where their origins are located.

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

RE: Segment definitions in osim file

Post by Ayman Habib » Mon Jun 09, 2008 1:25 pm

Hi JunJay,

OpenSim model file does not contain lengths, as these are not used by OpenSim. The attachment of different segments to their parents in the linkage are stored in the OpenSim file with every joint that attaches the segment to its parent (e.g. below). If you assume attachment at segment origins you can use this info to compute lengths.

<SimbodyJoint>

<SimbodyJoint name="ground_pelvis">

<bodies> ground pelvis </bodies>

<DofSet name="">

..

..

</DofSet>

<location_in_parent> 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 </location_in_parent>

<location_in_child> 0.00000000000000000000 0.00000000000000000000 0.00000000000000000000 </location_in_child>

</SimbodyJoint>

If the xml tags <location_in_parent>, <location_in_child> are missing they default to value of 0., 0., 0. If you save a model file from the GUI it should contain these tags so that you can modify them.

COM is described in local frame and is enclosed between the xml tags of the body as:

<mass_center> comx comy comz </mass_center>


Good luck,
-Ayman

POST REPLY