ami-iit / bipedal-locomotion-framework

Suite of libraries for achieving bipedal locomotion on humanoid robots
https://ami-iit.github.io/bipedal-locomotion-framework/
BSD 3-Clause "New" or "Revised" License
136 stars 36 forks source link

Add the possibility to resample the contact in a given contact list and force the MPC to required correctly sampled contacts #788

Closed GiulioRomualdi closed 7 months ago

GiulioRomualdi commented 7 months ago

While testing the integration of the MPC with MANN, we realized that the neural network was generating contacts whose activation and deactivation times weren't divisible by the MPC sampling time. This caused an issue when generating the internal vector of the MPC discretization. To overcome this limitation, we decided to implement a method in the ContactList to resample the contacts so that the activation and deactivation times are divisible with respect to a given sampling time.

Specifically, the activation time is decreased to ensure divisibility, while the deactivation time is increased. This way, we increase the overall contact duration.

Last but not least, the MPC checks that the contact timings are correctly sampled.