Change the base segment in OpenSim file

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Alessandra Ricci
Posts: 6
Joined: Mon Feb 04, 2008 6:08 am

Change the base segment in OpenSim file

Post by Alessandra Ricci » Wed Apr 09, 2008 3:03 pm

Hi!I hope that you can help me..In my thesis work I've used the model being in the OpenSim examples folder (Both Legs with Muscles).In OpenSim the pelvis is the base segment with six degrees of freedom with respect to ground. Now I've to change the base segment. How can I do it?Thank you! Alessandra Ricci

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

RE: Change the base segment in OpenSim file

Post by Ayman Habib » Thu Apr 10, 2008 12:54 am

Hi Alessandra,

The base segment is implied from the topology as a segment that's connected by a joint to the ground/world. You can rearrange your model (osim file) so a different segment is connected to ground/world, this will be your new base segment.

Hope this helps,
-Ayman

User avatar
Alessandra Ricci
Posts: 6
Joined: Mon Feb 04, 2008 6:08 am

RE: Change the base segment in OpenSim file

Post by Alessandra Ricci » Thu Apr 10, 2008 7:42 am

Dear Ayman Habib,
this is the first time for me to use OpenSim and so I dont' known how I can change the base segment in OpenSim file. That is my problem. Can you help me? Thank you. Alessandra

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

RE: Change the base segment in OpenSim file

Post by Daniel Leib » Thu Apr 10, 2008 11:12 am

Hi Alessandra,

In order to change this, you must edit the .osim file, which is an .xml file. If you look through the file, you'll notice a section where joints are defined. Change the file so that the desired segment, rather than the pelvis, is joined to the ground, and OpenSim will now recognize the desired segment as the base segment.

The following is where the pelvis and the world are joined in the bothlegs model:

<SimmJoint name="pelvis">
<bodies> world pelvis </bodies>

and then the characteristics of the joint are defined. Change "pelvis" to the body you need to use, set its characteristics, and you should be good to go.

-Dan

User avatar
Alessandra Ricci
Posts: 6
Joined: Mon Feb 04, 2008 6:08 am

RE: Change the base segment in OpenSim file

Post by Alessandra Ricci » Sat Apr 12, 2008 5:35 pm

Dear Dan,
as you explained to me, I've edited the BothLegs.osim file and I've noticed the section about joints. So I've deleted "world"
in the section SimmJoint "pelvis".Because I want that the feet are not moving with respect to ground I've added "world" in the section SimmJoint "l_calcaneus l_toes" and "r_calcaneus r_toes" but when I open the modified model an error occurs. Why?Thanks.
Regards,
Alessandra.

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

RE: Change the base segment in OpenSim file

Post by Daniel Leib » Sat Apr 12, 2008 6:34 pm

Hi Alessandra,

I'd guess a few errors are popping up because the characteristics of the joints need to be changed as well as some "clean up" on the former pelvis/ground joint. If you don't want that joint in your model at all any more, you must delete the rest of the xml file that relates to that joint, or OS will see the joint as present only with errors (in this case, a joint cannot exist with only one body).

You must also change any other xml files that refer to the previous version of the bothlegs model to reflect the changes you have made, or there will be conflicts in that regard.

If you'd like, I could take a look at the bothlegs version you have now and help point you in the right direction, as it's hard to tell what's happening without the errors on the screen.

The email address is daniel.leib@gmail.com


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

RE: Change the base segment in OpenSim file

Post by Daniel Leib » Mon Apr 28, 2008 11:08 am

Good afternoon,

Alessandra and I have been working on getting her model up and running, but have run in to an odd snag. We've added two joints between the ground and calcaneus (left and right) and are using the rX, rY, and rZ coordinates that were formerly used by the now-deleted pelvis-ground joint.

When I try to open it, though, OpenSim crashes without an error message. Does anyone have any idea what might be wrong? I can send the osim file to anyone willing to help.

Thanks,

Dan

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

RE: Change the base segment in OpenSim file

Post by Ayman Habib » Mon Apr 28, 2008 12:06 pm

Hi Daniel,

Please send me the osim file to me.

Best,
-Ayman

POST REPLY