Forward dynamics driven by prescribed muscle forces (instead of excitations) — possible in OpenSim? Any C++ examples? #4251
Closed
Yingfan99327
started this conversation in
General
Replies: 1 comment 1 reply
-
|
Hi @Yingfan99327, Please post questions of this nature to the OpenSim forum. We can answer your questions there. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi OpenSim Community,
I’m wondering whether it is possible to run a forward dynamics simulation in OpenSim where the driving signals are prescribed muscle forces (or tendon forces), rather than the usual muscle excitations used as controls.
In most OpenSim Forward dynamics workflows, controls are typically neural excitations applied to muscles, and the muscle–tendon dynamics determine the resulting forces. In my application, however, I would like to input a time-varying muscle force trajectory Fm(t) for selected muscles and use that as the actuation to drive the model forward and compute the resulting motion.
Is this feasible by writing custom code (C++ / Python API / MATLAB API)? Specifically, I’m considering approaches like:
Replacing muscles with force-driven actuators, e.g., CoordinateActuator / PointActuator / PrescribedForce, and using the prescribed force as the control input (possibly mapping muscle forces to generalized forces via moment arms).
Implementing a custom Actuator (or custom Muscle-like component) whose control signal is interpreted directly as force (optionally bounded), then integrating forward dynamics.
Some supported way to override/bypass a muscle’s internal activation–contraction dynamics and directly impose its output force during integration.
If this is possible, what is the recommended/cleanest approach in OpenSim? Are there any major pitfalls (e.g., consistency with tendon compliance, numerical stability, constraints, or the need to prescribe additional internal states if bypassing muscle dynamics)?
Also, are there any existing examples or reference implementations that demonstrate “force-driven” forward simulations? A C++ example would be ideal (even a minimal snippet showing how to define a custom actuator / prescribe actuator inputs and run Manager/SimTK integration would be extremely helpful).
Thanks a lot for any guidance and wishing you all the best.
Best regards.
Beta Was this translation helpful? Give feedback.
All reactions