Change gravity in a simulation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Claudia Castaneda
Posts: 2
Joined: Mon Apr 20, 2020 2:15 pm

Change gravity in a simulation

Post by Claudia Castaneda » Sun Sep 06, 2020 10:07 pm

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.

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Change gravity in a simulation

Post by Dimitar Stanev » Sun Sep 06, 2020 11:42 pm

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)

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

Re: Change gravity in a simulation

Post by Ayman Habib » Mon Sep 07, 2020 3:41 pm

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

POST REPLY