Page 1 of 1

How to Understand Generalized Forces in Inverse Dynamics

Posted: Sat Dec 07, 2024 4:40 am
by huhu
When using the inverse dynamics tool and excluding muscles, the resulting generalized forces are the same as the torques generated by muscle forces calculated through static optimization.
excludedForces = osim.ArrayStr();
excludedForces.append('Muscles');
idtool.setExcludedForces(excludedForces);
However, when directly using the inverse dynamics tool, the generalized forces are extremely large. How can this be understood?
What components make up the generalized forces calculated in this way?
import opensim as osim
idtool = osim.InverseDynamicsTool()
idtool.setName("arm")
idtool.setModelFileName("arm26.osim")
idtool.setCoordinatesFileName("arm26_Kinematics_q.sto")
idtool.setStartTime(0)
idtool.setEndTime(1)
idtool.setLowpassCutoffFrequency(6.0)
idtool.setResultsDir(".")
idtool.run()
The following figure shows the comparison of results with muscles excluded.