Page 1 of 1

Errors and warning when using a model with muscles

Posted: Mon Feb 14, 2022 9:56 am
by sietse
Hello List,

I have a relatively simple model, 5 bodies and 5 joints only using generalized coordinate actuators.
This works mostly fine with CMC. But when I added some muscles there are a few problems.
p_muscle.png
Pusher with muscles
p_muscle.png (188.46 KiB) Viewed 366 times
The model represents a "leg" on a box, and the leg consists of upper leg, lower leg and foot. Notice the 2 muscles with the knee.
The idea is that the leg pushes the box ("boat") over the ground using friction. For that I created a trajectory to describe that, it in fact is a cyclic movement.

When using Static Optimization, after properly setting the muscle-parameters there remain warnings
in about 10% of the time-steps. An example:

[warning] SimTK Exception thrown at InteriorPointOptimizer.cpp:264:
Optimizer failed: Ipopt: Maximum iterations exceeded (status -1)
[warning] OPTIMIZATION FAILED...
[warning] StaticOptimization.record: The optimizer could not find a solution at time = 0.48.
time = 0.48 Performance = 927240. Constraint violation = 4.02085e-15

Question 1: what does Performance mean? The violation seems very low to me (4e-15). How to cope with this?

When doing Forward Dynamics with this result the model wildly deviates from the trajectory, it in fact flies away. This happens far before the timesteps with the warnings. I understand that there can be deviations because of numerical errors, no feedback, but this seems to much (for my intuition).

When doing CMC there almost immediately is an exception:
(note that I do NOT put the 2 boat joints in the tasks.xml file. The idea is that this simulation calculates there values.)

Exception:
ArrayPtrs.get(aName): No object with name vastus
file= /home/sietse/Software/OpenSim/opensim-core/OpenSim/Common/ArrayPtrs.h
line= 897

Question 2: what is going on here? vastus is one of the muscles.

Question 3: when I have a muscle of length 1 meter in my model, what are proper values for OptimalFiberLength and TendonSlackLength?
I now do something like 0.8 and 0.2.

The code can be found at https://github.com/SietseAchterop/Rowin ... ter/Pusher
The model: pusher_muscle.py, Pusher_muscle.osim.
The trajectory: trajectory.py -> trajectory.trc -> trajectory.mot
And the setup.xml files.
Finally, pusher_CMC_video.mp4 shows the pusher in action with the no-muscle version.

Any help would be much appreciated! Sietse

Re: Errors and warning when using a model with muscles

Posted: Thu Feb 17, 2022 4:23 am
by sietse
To answer my own question: I had an error in the tasks file for CMC. Sorry for the noise.