loco-3d / crocoddyl

Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on various efficient Differential Dynamic Programming (DDP)-like algorithms
BSD 3-Clause "New" or "Revised" License
845 stars 173 forks source link

Talos foot slides in official examples (with zero Baumgarte gains) #1007

Closed egordv closed 3 years ago

egordv commented 3 years ago

Hello! First of all thank you for a great framework and sharing it!

Right now I'm spending a hard time mastering it, and stuck with a small but annoying problem of my robot's foot sliding during motions generated by crocoddyl. After spending some time debugging I noticed that even in the examples provided with official repo ( biped_walk.py ) the Talos right foot is sliding towards the center of the robot, ending up with feet penetrating each other: image This is clearly visible when looking at the generated walking sequence or by checking the CoM plot: image.

I've noticed about Baumgarte stabilization and issues with it (referring to #605), but pictures above made with the vanilla biped.py and according to line 185 stabilization gains are zeros. And the left foot (which contact model is the same as the right foot's one) is not sliding and acts as expected.

Please give a hint how to properly debug this issue. At least some knowledge where to look to fix the official examples provided will be great!

cmastalli commented 3 years ago

Hey @egordv,

The penetration (or sliding) motions are due to numerical errors that appear in DAE commonly. The Baumgarter stabilization is a common approach to handle those errors.

I have included some reasonable gain values in #1008; however, feel free to tune/play those gains.

I will close this issue, but feel free to ask further questions.

egordv commented 3 years ago

Thank you @cmastalli, D gain of 50.0 works perfectly!