Page 1 of 1

Problem updating model state

Posted: Wed Feb 24, 2021 3:29 am
by frabottin
Dear all,
while converting some MATLAB scripts from v3.3 and v4.1, I ran into a problem, that appears to be related to the state of the model (gait2392), more specifically to the accelerations.

To update the state, I used the equilibrateMuscles(state) function, which is called at each iteration, prior to computing muscle related quantities (e.g., muscle moment arms).

As a result, depending on the OpenSim version used, all variables related to the state (i.e., muscle moment arms, B = curMus.computeMomentArm(state, curCoord), and active muscle force along the inextensible tendon, Fopt = curMus.calcInextensibleTendonActiveFiberForce(state, 1)) differed.
The differences appear to be confined to the muscles attaching on the tibia (e.g., bifemsh).

Q (generalized coordinates) and U (generalized speeds) are the same; but, the UDot vectors (state.getUDot()) change. Could this be the cause for those differences?
Could you please help me out?

Thanks,
Francesca