Page 1 of 1

How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Data

Posted: Thu Dec 05, 2024 3:54 am
by 2112yonas
Hello all,

I have used OpenCap to capture kinematic data for different sports activity, and I would like to know how I can generate inverse dynamics data from the kinematics data collected by OpenCap. Could you provide me some guidance on how I can proceed with this.

As a follow-up question. Is it possible to remove external forces (like Ground Reaction Forces and Gravity) from the model or data and still be able to simulate and obtain inverse kinematics and Invers dynamics data?

Thank you for your help!

Best regards,

Yonas

Re: How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Dat

Posted: Thu Dec 05, 2024 2:57 pm
by mpetrucc
Hi Yonas,

You should have inverse kinematic data out of the box already (.mot file in the download).

For kinetics, you need to do dynamic simulations using the example code here: https://github.com/stanfordnmbl/opencap ... inetics.py.

It would be harder now that you have already collected data, but if there is away to align your OpenCap coordinate system with force plates, we have this example code to run inverse dynamics: https://github.com/stanfordnmbl/opencap ... ntegration

Hope this helps,
Matt

Re: How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Dat

Posted: Fri Jan 03, 2025 3:24 am
by 2112yonas
Hello,

Thank you Matt Petrucci for your previous prompt and sharing helpful resources. Following that, I was trying to run OpenCap processing for (Kinetics/muscle driven simulation) out of OpenCap data. But I am unable to run OpenSim 4.5 after installing Anacopnda3 environment on window 11. I followed the instructions provided in https://github.com/stanfordnmbl/opencap-processing, But I am encountering errors repeatedly. Such as, 'openism' is not recognized as an internal or external command,
operable program or batch file.

My I get better update or other way to simulate kinetics?

Re: How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Dat

Posted: Tue Jan 07, 2025 3:38 pm
by mpetrucc
Hi Yonas,

Just to clarify, you were able to run the dynamic simulations with the code in the opencap-processing repository, but aren't able to open the OpenSim 4.5 GUI?

Matt

Re: How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Dat

Posted: Fri Jan 10, 2025 3:49 am
by 2112yonas
Yes Matt, I was able to run the dynamic simulations with the code provided in the opencap-processing repository using Anaconda Prompt. However, I am unsure where the files are saved and how to open them in the OpenSim 4.5 GUI after that.

Could you please clarify how can I find the simulation files or where they could be saved in order to open it in OpenSim GUI ?

Additionally, I got some plots (e.g., muscle activation, ground reaction force, joint torque, etc.) from Anaconda Prompt simulation. Are these plot results based on my OpenCap data or are they from the OpenCap Processing repository?

Re: How to generate Inverse Dynamics from OpenCap Kinematics data, and How to Remove External Forces in the Model or Dat

Posted: Tue Jan 14, 2025 2:56 pm
by mpetrucc
Hi Yonas,

That's great!

When you are in OpenSim, you can go File -> Load Model, and select the .osim file with contact in your Session -> OpenSimData -> model folder.

Once the model is loaded, you can load the motion FIle -> Load Motion and selection the "kinematics and activations" file in your OpenSim -> Dynamics folder.

Note there is lots of documentation on our Confluence site about running simulations that could be helpful. https://opensimconfluence.atlassian.net ... +Tutorials

Hope this helps,
Matt