OpenSim API: problem of muscle force velocity function with Millard muscle type

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Jonathan SAVIN
Posts: 11
Joined: Wed Feb 10, 2021 12:52 am

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Post by Jonathan SAVIN » Mon Nov 21, 2022 7:00 am

Thanks Mr. Uchida for this idea. It works only with Opensim4.4, right ? With Opensim 4.1 python scripting, I get a "'Millard2012EquilibriumMuscle' object has no attribute 'getFiberVelocityInfo'" error. For test purpose, please attached find py test script, the associated models and matplotlib figures highlighting the problem...
Attachments
TestForceVelocityCurve.zip
(98.7 KiB) Downloaded 81 times

Tags:

User avatar
Jonathan SAVIN
Posts: 11
Joined: Wed Feb 10, 2021 12:52 am

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Post by Jonathan SAVIN » Fri Feb 03, 2023 2:47 am

Hi everyone, unfortunately I confirm that this bug still exists in Opensim 4.4 (with python 3.8). The force-velocity multiplier remains totally flat. If anyone has an idea, it would be greatly appreciated, as this topic seems to have been ignored for months :?

User avatar
Jonathan SAVIN
Posts: 11
Joined: Wed Feb 10, 2021 12:52 am

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Post by Jonathan SAVIN » Tue Apr 25, 2023 2:04 am

Changing one property for all Millard muscles leads to the expected simulation :
<ignore_tendon_compliance>false</ignore_tendon_compliance>

User avatar
Mohammadreza Rezaie
Posts: 408
Joined: Fri Nov 24, 2017 12:48 am

Re: OpenSim API: problem of muscle force velocity function with Millard muscle type

Post by Mohammadreza Rezaie » Wed Apr 26, 2023 9:01 am

Hi, in Millard2012EquilibriumMuscle both set_ignore_tendon_compliance and computeEquilibrium influence the force-velocity multiplier values, i.e.:

Code: Select all

ignoreTendonCompliance     computeEquilibrium     ForceVelocityMultiplier
        False                     False                     0
        False                     True                      1
        True                      False                     values
        True                      True                      values
More info can be found here:
https://github.com/opensim-org/opensim- ... #L537-L556
https://github.com/opensim-org/opensim- ... #L742-L896

I'm not sure if this is a bug. In this paper for instance, Muscle coordination retraining inspired by musculoskeletal simulations reduces knee contact force, compliant tendons were incorporated followed by equilibrateMuscles, and hence, force-velocity relationship was excluded (ForceVelocityMultiplier==1).

POST REPLY