Change the base segment in OpenSim file
- Alessandra Ricci
- Posts: 6
- Joined: Mon Feb 04, 2008 6:08 am
Change the base segment in OpenSim file
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
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Change the base segment in OpenSim file
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
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
- Alessandra Ricci
- Posts: 6
- Joined: Mon Feb 04, 2008 6:08 am
RE: Change the base segment in OpenSim file
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
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
- Daniel Leib
- Posts: 75
- Joined: Mon Sep 11, 2006 6:44 am
RE: Change the base segment in OpenSim file
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
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
- Alessandra Ricci
- Posts: 6
- Joined: Mon Feb 04, 2008 6:08 am
RE: Change the base segment in OpenSim file
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.
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.
- Daniel Leib
- Posts: 75
- Joined: Mon Sep 11, 2006 6:44 am
RE: Change the base segment in OpenSim file
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
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
- Daniel Leib
- Posts: 75
- Joined: Mon Sep 11, 2006 6:44 am
RE: Change the base segment in OpenSim file
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
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
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
RE: Change the base segment in OpenSim file
Hi Daniel,
Please send me the osim file to me.
Best,
-Ayman
Please send me the osim file to me.
Best,
-Ayman