Page 1 of 1

How to export ligament length from opensim directly?

Posted: Wed Feb 24, 2021 8:17 am
by tyq_80
Hello, everyone. I have add some custom ligaments in the foot model. Now I want to get ligament length to calculate ligament strain during one gait cycle. However, I don't know how to export ligament length from opensim.Is there anyone can you help me? Thanks a lot.

Re: How to export ligament length from opensim directly?

Posted: Mon Mar 01, 2021 4:27 am
by clnsmith
https://simtk.org/frs/?group_id=91

If you install the OpenSim 4.2 beta, there is a new component called the Blankevoort1991Ligament. This component has an output called "length"

You can find an example of the xml structure here (or in Help->XML Browser in OpenSim 4.2 GUI):
https://github.com/clnsmith/opensim-jam ... sim#L10444

Here is a doxygen page since I don't think there is one published online for 4.2 yet.
https://github.com/clnsmith/opensim-jam ... oxygen.pdf

Re: How to export ligament length from opensim directly?

Posted: Mon Mar 01, 2021 4:29 am
by clnsmith
If you are using the existing Ligament component, you can use the getLength (const SimTK::State &s) function.

https://simtk.org/api_docs/opensim/api_ ... ament.html