Page 1 of 1
Change the base segment in OpenSim file
Posted: Wed Apr 09, 2008 3:03 pm
by alericci
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
RE: Change the base segment in OpenSim file
Posted: Thu Apr 10, 2008 12:54 am
by aymanh
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
RE: Change the base segment in OpenSim file
Posted: Thu Apr 10, 2008 7:42 am
by alericci
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
RE: Change the base segment in OpenSim file
Posted: Thu Apr 10, 2008 11:12 am
by danielleib
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
RE: Change the base segment in OpenSim file
Posted: Sat Apr 12, 2008 5:35 pm
by alericci
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.
RE: Change the base segment in OpenSim file
Posted: Sat Apr 12, 2008 6:34 pm
by danielleib
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
RE: Change the base segment in OpenSim file
Posted: Mon Apr 28, 2008 11:08 am
by danielleib
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
RE: Change the base segment in OpenSim file
Posted: Mon Apr 28, 2008 12:06 pm
by aymanh
Hi Daniel,
Please send me the osim file to me.
Best,
-Ayman