Is it possible to visualize muscle fiber and tendon lengths loaded from a states file? #947
Replies: 1 comment 1 reply
-
I had not realized OSC could visualize muscle fiber and tendon lengths - this is a great feature and something I've wished for in OpenSim for a long time. It's extremely valuable to be able to visually verify reasonable muscle fiber and tendon lengths in the model. As a suggestion for a future feature, it would be even more helpful to be able to dynamically update the tendon/fiber lengths during a simulation (or visualize them when loaded from a file). The muscle fibers can contract and the tendons stretch during a simulation, so they may vary over the course of a simulation. This can cause other problems that arise during the simulation. For example, CMC will sometimes spit out a warning that the muscle is producing small force because it is outside of it's nominal operating range on the force length curve. This can be caused by unrealistic fiber/tendon lengths, but it is a bit of a mysterious warning when you first see it. Being able to visually verify the fiber/tendon lengths during a simulation can help ensure that parameters such as tendon stiffness are realistic. |
Beta Was this translation helpful? Give feedback.
-
OpenSim determines muscle and fiber lengths from the model's joint coordinates (i.e. the model's position), so as long as you can load a states file that contains joint coordinates, then OSC should have enough information to give you muscle fiber/tendon lengths. The current options to visualize them include
Via a 3D viewer panel: Top-left there's an option to change how muscles are rendered/scaled/colored. "Fiber length" uses a color factor derived from the difference between the muscle's current length and its optimal length (https://github.com/ComputationalBiomechanicsLab/opensim-creator/blob/0.5.16/src/OpenSimCreator/Graphics/OpenSimDecorationGenerator.cpp#L147). "Fibers & Tendons" changes muscle rendering such that there's an uncolored+smaller grey segment that's as long as the tendon length (symmetrically, either side of the fibers, because OpenSim doesn't know tendon distribution (https://github.com/ComputationalBiomechanicsLab/opensim-creator/blob/0.5.16/src/OpenSimCreator/Graphics/OpenSimDecorationGenerator.cpp#L752).
Via "output watches": right-click a muscle, watch output, fiber length/tendon length. Displays as a single value in edit mode or as a timeseries in simulation mode.
Via "Plot vs. Coordinate" (live muscle plotting): right-click a muscle, plot vs. coordinate, choose coordinate, use the dropdowns at the top ($MUSCLE's $OUTPUT vs. $COORDINATE) of the panel to select "Fiber Length" or "Tendon Length". This shows a plot in edit-mode that updates when the model is edited. Overlays can be imported over it, which is handy for modelling.
Beta Was this translation helpful? Give feedback.
All reactions