3D knee kinetic

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
Sandra Salvador
Posts: 4
Joined: Mon Mar 07, 2022 1:13 pm

3D knee kinetic

Post by Sandra Salvador » Tue Apr 23, 2024 6:48 am

Good afternoon,

Firstly, thank you for your amazing work!

Secondly, I've been attempting to compute 3D knee kinetics during a side cutting. To achieve this, I modified the LaiUhlrich2022 model by adding 2 more coordinates in the knee. Additionally, I included data in muscleDataOpenSimAD, mainOpenSimAD, and settingsOpenSimAD...
However, when I attempted to run the code, I encountered the following error:

Processing Sidecut_1 - Case torque_driven
Traceback (most recent call last):
File "C:\Users\sandr\Documents\GitHub\test_sidecut_1_Sandra.py", line 167, in <module>
run_tracking(baseDir, dataFolder, session_id, settings, case=case,
File "C:\Users\sandr\Documents\GitHub\UtilsDynamicSimulations\OpenSimAD\mainOpenSimAD_Sandra.py", line 590, in run_tracking
f_passiveTorque[joint] = limitPassiveTorque(
File "C:\Users\sandr\Documents\GitHub\UtilsDynamicSimulations\OpenSimAD\functionCasADiOpenSimAD_Sandra.py", line 142, in
limitPassiveTorque
passiveJointTorque = (k[0] * np.exp(k[1] * (Q - theta[1])) + k[2] *
IndexError: tuple index out of range

Is it possible to compute 3D knee kinetics with OpenSimAD, or do I need OpenSim Moco?

Thank you very much!

Sandra Salvador

User avatar
Antoine Falisse
Posts: 403
Joined: Wed Jan 07, 2015 2:21 am

Re: 3D knee kinetic

Post by Antoine Falisse » Wed Apr 24, 2024 10:22 am

Hey,

It is tricky to get the OpenSimAD code to work with another model.
You can get check here some work in progress to support one additional dof: https://github.com/stanfordnmbl/opencap ... /114/files

What is especially tricky is how do want to actuate these extra degrees of freedom. It is know for instance that KAM is not really produced by muscles, but more the results for bone-to-bone contact, which is not something modeled in OpenSim. In the example above, I took the decision to "not actuate" the muscle and just assume that in practice something is balancing the inverse dynamic torque. I don't know enough about the knee rotation to know if it would apply for that dof too.

Not exactly sure about your error without having code to reproduce. I am assuming you might have not changed something in muscleDataOpenSimAD. Not that you can choose not to have limit torques for your extra dofs.

Hope it helps,
Antoine

POST REPLY