Page 1 of 1

Change gravity in a simulation

Posted: Sun Sep 06, 2020 10:07 pm
by claudiacv99
Hello,
I am relatively new to OpenSim. I would like to know how to change the gravity of a simulation. For example, by default the gravity in the Gait2354_Simbody model is -9.80665 and if I upload a motion file (ex. Subject01_walk1_ik.mot) I get the following result:
https://drive.google.com/file/d/1yc0uF9 ... sp=sharing

But when I change the gravity in "properties" to -20 or +300 I get the same result in walking as with gravity = -9.80665:
https://drive.google.com/file/d/1G0GY2_ ... sp=sharing

Could someone explain to me why this is happening or what I am doing wrong. I want the simulation to be according to the value of gravity (as in Gazebo). Thank you very much for the help.

Re: Change gravity in a simulation

Posted: Sun Sep 06, 2020 11:42 pm
by mitkof6
Hi Claudia,

The problem is that when you load a motion file, it just reads the coordinate values and assigns them to the model. If you want to predict the effect of gravity, you have two approaches depending on what you want to do:

1. either you have the same movement (as with normal gravity) and are interested in the joint moments and muscle effort and how they change
2. or try to predict a new movement using forward dynamics methods (e.g., OpenSim MOCO)

Re: Change gravity in a simulation

Posted: Mon Sep 07, 2020 3:41 pm
by aymanh
Thanks Dimitar,

Restating what Dimitar said, you did not create a new simulation with the modified model/gravity as such you shouldn't see anything different. Motions and ground reaction forces are just recorded trajectories/data and as such have no reason to change based on how you modified gravity in the current model. Can you clarify what were your expectations?

Thank you,
-Ayman