Page 1 of 1

Difference between get_curviness and getCurvinessInUse

Posted: Tue Dec 17, 2019 8:41 am
by yangkaiwen
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?

Re: Difference between get_curviness and getCurvinessInUse

Posted: Tue Dec 17, 2019 12:07 pm
by tkuchida
"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.

Re: Difference between get_curviness and getCurvinessInUse

Posted: Tue Dec 17, 2019 5:33 pm
by yangkaiwen
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.