Difference between get_curviness and getCurvinessInUse

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

Difference between get_curviness and getCurvinessInUse

Post by Kaiwen Yang » Tue Dec 17, 2019 8:41 am

what is the difference between method get_curviess and getCurvinessInUse

a=myMillardMuscle.get_FiberForceLengthCurve; % I am trying to change the curviness of Millard Equilibrium muscle

a.set_curviness(0);

a.get_curviness

ans=

0

a.getCurvinessInUse

ans=

0.75

what is the difference between method get_curviess and getCurvinessInUse

I dont find an explanation here:

https://simtk.org/api_docs/opensim/api_ ... e7ed1ca708

Am I actually changing the curviness or not?

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Difference between get_curviness and getCurvinessInUse

Post by Thomas Uchida » Tue Dec 17, 2019 12:07 pm

"curviness" and "CurvinessInUse" may differ, depending on the muscle model and the value of the "curviness" property. The code reads the "curviness" property and adjusts it if necessary; if no adjustment is necessary, then "CurvinessInUse" and "curviness" will be equal. In OpenSim 3.3, I think you would need to set the "curviness" property and then call initSystem() for the change to take effect.

User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

Re: Difference between get_curviness and getCurvinessInUse

Post by Kaiwen Yang » Tue Dec 17, 2019 5:33 pm

It works. Thank you.

Also, if I don't set curviness first and try to call method get_curviness, Matlab will crash. However, 'getCurvinessInUse' will give me some default value. After setting some reasonable curviness and init_system, based on Millard Muscle, both get_curviness and getCurvinessInUse will agree.

POST REPLY