Setting fast_optimization in CMC to false doesn't work for me.

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Sietse Achterop
Posts: 72
Joined: Tue Sep 14, 2021 3:01 am

Setting fast_optimization in CMC to false doesn't work for me.

Post by Sietse Achterop » Sat Nov 27, 2021 8:09 am

Hello list,
I seem to misunderstand the slow optimization setting, because it does not seem to work.
I created a simple model using 3 bodies and 3 Pinjoints, all code and a few video's to show the working of controlling the model using fast or slow optimization. The code can be found here here.
leg.png
leg.png (103.23 KiB) Viewed 128 times
The model can be seen as a simple leg: upper leg, lower leg and a foot. I created a trajectory.trc using trajectory.py to move the foot.
Using the IK tool the trajectory.mot is created.
Using fast optimization CMC works as expected, see the this video

But with slow optimization the joint cannot hold the leg in the correct position. When verbose logging is turned on you can see that the "Desired actuator forces" are well below the maximum of 10000. See this video

From the documentation I understood that with slow optimization the algorithm reduces to a basic PD controller. I don't understand that the controller cannot hold the leg in the proper position while there is room to increase the control input to the actuators.
What am I missing?

UPDATE: Found the issue: as described in the documentation you should set the <weight> for a coordinate to a high enough value, see the push_CMC_Tasks.xml file. It works now!

Sietse

PS. Also using CMC_contraints.xml does not help much even if default_min/max a increased to +/- 1000000. CMC now crashes due to a not enough force!

PS2. The behaviour of slow optimization widely differs on Linux and Windows. But both go wrong.

POST REPLY