Hi, I'm a new user of Opensim 4.3 and I've limited knowledge about the software. I usually use it to generate the inverse kinematics and the inverse dynamics, then extract the moment arm of muscles and the joint moment to solve the static optimization in Matlab on my own.
I'm pretty sure a few years ago I could easily plot the moment arm of muscles over the time to show and extract them for the static optimization. I wanted to do it again in Opensim 4.3 but I couldn't. I know that I can get the moment arm of the muscles over the joint angle, but that's a problem for bi-articular muscles, and joints with multiple rotations. I'm assuming Opensim calculates this to solve SO, so how can I get this data easily (for a noob )
Thanks in advance !
Muscle moment arm over time
- MICHAUD Florian
- Posts: 1
- Joined: Wed Jul 23, 2014 1:40 am
- Ayman Habib
- Posts: 2252
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Muscle moment arm over time
Hello,
There has been major refactoring of the API in version 4.0+ which may explain the differences from "few years ago". As of now, if you are analyzing a State and you'd like to compute the momentArm of a Muscle about a specific coordinate then you can use the method
How to get the State and apply it to the model and how to get a reference to the GeometryPath and Coordinate is more involved but a good place to start would be the distributed OpenSim/Matlab examples typically found under
{USER}/Documents/OpenSim/4.3/Code/Matlab
Hope this helps,
-Ayman
There has been major refactoring of the API in version 4.0+ which may explain the differences from "few years ago". As of now, if you are analyzing a State and you'd like to compute the momentArm of a Muscle about a specific coordinate then you can use the method
Code: Select all
GeometryPath::computeMomentArm(const SimTK::State& s, const Coordinate& aCoord)
How to get the State and apply it to the model and how to get a reference to the GeometryPath and Coordinate is more involved but a good place to start would be the distributed OpenSim/Matlab examples typically found under
{USER}/Documents/OpenSim/4.3/Code/Matlab
Hope this helps,
-Ayman