Cannot get CMC to work with my model.
The problem is that the error in the position (joint angles) is NOT driven to zero, so CMC does not seem to be working!
I asked on this list and posted an issue (#3345) on opensim-core, but no reaction at all.
I really don't know what to do now apart from repeating my question here!
I started with a larger model, which eventually should describe a human in a simplified rowing boat.
I am only interested in simulation and want to use CMC to prescribe the motion of the rower.
The goal is to find out how fast the boat is moving giving a rigging of the boat and the dimensions and movement of the rower.
A first basic version, using no muscles, didn't work, so I started simplifying it.
It now is reduced to only 2 joints: a pinJoint and a ballJoint, but it still doesn't work. Here an image of the model. To use it a trajectory is created.
Apart from a short wiggle in one joint at the beginning it should stay still, but after the wiggle the system becomes unstable. Please find the resulting behaviour below which is completely wrong! A trajectory without the wiggle also makes the system unstable, only a few seconds later.
Maybe because no muscles are used here? Should the CMC algorithm be different for this situation?
The zipfile below contains the, very simple, model and trajectory.
Again, please help! Sietse
PS. Here a fragment of the log at about 1.7 seconds.
Code: Select all
[info] CMC::computeControls, root solve (tFinal = 1.7):
[info] -- controls = 1.7
[info]
[info] CMC::computeControls, t = 1.7
[info] -- step size = 0.00200000, target time = 1.70200
[info] ------------------------------
[info] CMC::computeControls, summary:
[info] ------------------------------
[info] -- Q = ~[0.140326 0.183636 3.3165 -27.1329 0]
[info] -- U = ~[-1.16965 4.20952 -5.7145 110.305]
[info] -- Z = ~[]
[info] -- Qdesired = 0.119718 0.934394 2.04204 -0.409413
[info] -- Udesired = 4.73686e-28 3.74167e-27 1.5158e-26 7.57898e-27
[info] -- Qcorrection = 0.0206076 -0.750757 1.27446 -26.7235
[info] -- Ucorrection = -1.16965 4.20952 -5.7145 110.305
[info] ------------------------------
[info]
[info] Errors at time 1.7:
[warning] Task 'lbackangle': pErr = -0.0206076, vErr = 1.16965.
[info]
[warning] Task 'uarmleft_out': pErr = 0.750757, vErr = -4.20952.
[info]
[warning] Task 'uarmleft_trn': pErr = -1.27446, vErr = 5.7145.
[info]
[warning] Task 'uarmleft_up': pErr = 26.7235, vErr = -110.305.
[info]
.........
[info]
[info] Desired actuator forces: 2382.42 -40.7849 39.8364 525.41
[info]
But the optimization still succeeds while driving q away(!) from the value in the trajectory!
The simulation will end after the forces are exceeding the set limit.