Hi OpenSim community,
I am trying to use the Python API to perform the inverse kinematics and inverse dynamics analysis on a subject walking on force plates.
I did manage to do the IK step so then I would like to perform the ID after that.
But there are not a lot of examples or guidelines on how to perform the inverse dynamics step.
I saw that one can use InverseDynamicTool but it requires to use a lot of external files which is not ideal.
I would therefore prefer to use InverseDynamicSolver but there are no good examples.
I saw one test case you wrote but it is not very clear what are the steps to perform: https://github.com/opensim-org/opensim- ... dy.py#L241
Would you be able to guide me to perform the ID step?
Thanks
Inverse Dynamics with Python API
- Vincent Fohanno
- Posts: 23
- Joined: Thu May 10, 2018 10:03 am
- Carmichael Ong
- Posts: 401
- Joined: Fri Feb 24, 2012 11:50 am
Re: Inverse Dynamics with Python API
The doxygen page have some info that may be helpful: InverseDynamicsSolver doxygen page
There are a few other uses of the InverseDynamicsSolver in C++. While the syntax may look different than Python/Matlab, the calls should be very similar (since it calls the same code). A few places that might be helpful:
- The ID test case: https://github.com/opensim-org/opensim- ... D.cpp#L199
- How the InverseDynamicsTool uses the solver: https://github.com/opensim-org/opensim- ... l.cpp#L408
There are a few other uses of the InverseDynamicsSolver in C++. While the syntax may look different than Python/Matlab, the calls should be very similar (since it calls the same code). A few places that might be helpful:
- The ID test case: https://github.com/opensim-org/opensim- ... D.cpp#L199
- How the InverseDynamicsTool uses the solver: https://github.com/opensim-org/opensim- ... l.cpp#L408
- Vincent Fohanno
- Posts: 23
- Joined: Thu May 10, 2018 10:03 am
Re: Inverse Dynamics with Python API
Thank you for the links.
I already saw them but will will have a look at them again.
I already saw them but will will have a look at them again.