Page 1 of 1

Is Gravity Modification in OpenSim 4.5 from OpenCap Data Not Affecting Simulation Results?

Posted: Fri Feb 07, 2025 4:32 am
by 2112yonas
Hi everyone,

I successfully simulated OpenCap processing and was able to load the data into OpenSim 4.5. I wanted to experiment with different gravity settings, so I modified the gravity parameter in the .osim file. After that, I ran inverse dynamics and muscle-driven simulations.

However, the output plots I'm getting are identical to those from the original simulations (before modifying gravity).

Does this mean that gravity isn't affecting the simulations?
Is there a specific step required to ensure the gravity change impacts the simulation results?
Could this be related to how OpenCap processes the data or how OpenSim handles external forces?

Any insights or suggestions would be greatly appreciated!

Re: Is Gravity Modification in OpenSim 4.5 from OpenCap Data Not Affecting Simulation Results?

Posted: Fri Feb 07, 2025 4:05 pm
by mpetrucc
Hi Yonas,

Is it the kinematic plots that aren't changing? What do your muscle activation plots look like? The simulations that are setup in example_kinetics are tracking simulations that are trying to solve for the inputs that would reproduce your input kinematics.

Matt

Re: Is Gravity Modification in OpenSim 4.5 from OpenCap Data Not Affecting Simulation Results?

Posted: Sun Feb 09, 2025 11:52 pm
by 2112yonas
Hi Matt,

Thanks for your response!

I have been trying to simulate Inverse Kinematics and Inverse Dynamics for a Jumping Jacks scenario. After running OpenCap processing, the Inverse Dynamics files aren't being generated. I also tried to modify the gravity parameter using the session ID from the example (STS file), but I still see no changes in the result plots.

I attached IK plot and Sit to stand plot I got by Simulating it in OpenSim.

My expectation is to see noticeable variations in the IK and ID plots when varying the gravity parameter.

Thanks again for your help !

Re: Is Gravity Modification in OpenSim 4.5 from OpenCap Data Not Affecting Simulation Results?

Posted: Tue Feb 18, 2025 11:34 am
by mpetrucc
Hi Yonas,

Sorry to clarify, are you running this code? https://github.com/stanfordnmbl/opencap ... example.py

Or this code? https://github.com/stanfordnmbl/opencap ... inetics.py

Note, if you are running the later, you cannot run the dynamics simulations to get forces if you used the LaiUhlrich model with the ISB shoulder.

Hope this helps,
Matt

Re: Is Gravity Modification in OpenSim 4.5 from OpenCap Data Not Affecting Simulation Results?

Posted: Thu Feb 20, 2025 3:05 am
by 2112yonas
Hi Matt,

Thank you for the replay. Yes, I used the second code (https://github.com/stanfordnmbl/opencap ... inetics.py) and LaiUhlrich2022 model.