Page 1 of 1
Disabling gravity
Posted: Mon Nov 19, 2007 8:11 am
by danielleib
Good morning,
I'm hoping to run a few simulations that don't involve contact with any particular ground surface as I don't have forces available, such as riding a bike and a baseball pitch. I tried to step through the demo format to get to a forward dynamics simulation, but the model starts "falling" when the RRA analysis begins. I took a look through some of the XML files but couldn't find something that looked like gravity; how can I disable it so my model stays stationary in space without ground reaction forces?
Thanks,
Dan
RE: Disabling gravity
Posted: Tue Nov 20, 2007 12:32 pm
by aymanh
Hi Daniel,
Gravity is specified in the model's osim file under the xml tag <gravity>:
<gravity> 0.00000 -9.80665000 0.00000</gravity>
You can use a text editor to modify it or you can open the file using
Edit->File (.osim)
Browse for the model file (.osim)
Expand the tree in the left column of the "Property Editor" dialog down to:
Model
DynamicsEngine
gravity
and modify the values in the column labeled Value. Then hit "Save".
Next time you open the model it will have no gravity.
Hope this helps,
-Ayman
RE: Disabling gravity
Posted: Tue Nov 20, 2007 12:38 pm
by danielleib
Ah, thanks, I was looking in the setup files.
Have a good one,
Dan
RE: Disabling gravity
Posted: Tue Nov 20, 2007 3:11 pm
by danielleib
Thanks again for the tip on editing the .osim file, that worked like a charm. Unfortunately, it seems as though the forward dynamics tool doesn't want to work without an external force; I tried going through the demo that uses gait_2354.osim after removing the vertical component of gravity and it worked well until forward dynamics, where the program closed after hitting the run button. Throughout the demo, I also unchecked the option to apply external forces, as I won't have any available for the simulations I mentioned earlier.
Is there something in the input controls or states that is dependent on forces that I can change? Perhaps another setting somewhere?
Thanks for your help,
-Dan
RE: Disabling gravity
Posted: Wed Nov 21, 2007 11:30 am
by aymanh
Dan,
I reproduced and fixed the problem related to trying to run a forward simulation without external loads. The fix will be in version 1.1 which will be out shortly. For what you have I'd suggest you set the values of the ground reaction forces in the data files to 0. and let OpenSim apply them, and that should keep you going.
Have a good one,
-Ayman