I simplified the model more but it still is failing. I really am stuck!
The model now consists of 1 sliderjoint, 4 pinjoints and 1 customjoint, all with coordinate-actuators.
There are no muscles and one weld-constraint to close a kinematic loop.
Think rower in a boat.
The complete example is in the zip-file. The model is created from the python file.
The trajectory.trc that is used is created in a python program, so I am only simulating.
The problem is that CMC almost immediately fails, both on Linux and Windows.
Code: Select all
[2022-12-18 16:33:16.143] [info] CMC::computeControls, t = 0.02
[2022-12-18 16:33:16.181] [error] SimTK Exception thrown at InteriorPointOptimizer.cpp:270:
Optimizer failed: Ipopt: Infeasible problem detected (status 2)
[2022-12-18 16:33:16.181] [error] OPTIMIZATION FAILED...
[2022-12-18 16:33:16.181] [error] CMC::computeControls: Optimizer could not find a solution.
Unable to find a feasible solution at time = 0.02.
In function CMCTool:run the function CMC:computeControls is called (for the very first time) in line 802.
In that function the ipopt-optimizer is called in SimTKmath/Optimizers/src/InteriorPointOptimizer.cpp line 97.
There the call to IpoptSolve fails with a status of 2.
This all before the main loop of the simulation, just before the following is in the log:
[info] Using CMC to track the specified kinematics:
The question is of course, why does it fail, and more importantly, how can I make it to work.
I would assume that because each joint has a coordinate actuator, actuator values can be derived to get the model in the proper (initial?) position.
It probably has to do with the weld-constraint in the lower leg. Removing it makes it "work", but with a broken leg:(.
Thanks in advance, Sietse.
PS. I assume that it could have been simplified even more by removing the torso and head. I left them there because there is a marker in the shoulder that is used and it is fairly complicated to create another dataset.