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

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
YONAS YIBKAW
Posts: 5
Joined: Mon Oct 07, 2024 4:36 am

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

Post by YONAS YIBKAW » Fri Feb 07, 2025 4:32 am

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!

User avatar
Matt Petrucci
Posts: 250
Joined: Fri Feb 24, 2012 11:49 am

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

Post by Matt Petrucci » Fri Feb 07, 2025 4:05 pm

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

User avatar
YONAS YIBKAW
Posts: 5
Joined: Mon Oct 07, 2024 4:36 am

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

Post by YONAS YIBKAW » Sun Feb 09, 2025 11:52 pm

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 !
Attachments
sts.png
Sit to stand Kinematics activation plot from example file
sts.png (93.81 KiB) Viewed 118 times
Kinematics.png
IK plot from Jumping Jacks scenario
Kinematics.png (189.79 KiB) Viewed 121 times
Jumping Jack sport.png
Jumping Jacks from OpenSim
Jumping Jack sport.png (109.2 KiB) Viewed 124 times

User avatar
Matt Petrucci
Posts: 250
Joined: Fri Feb 24, 2012 11:49 am

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

Post by Matt Petrucci » Tue Feb 18, 2025 11:34 am

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

POST REPLY