Mohamed Elobaid, Giulio Turrisi, Lorezno Rapetti, Giulio Romualdi, Stefano Dafarra,
Tomohiro Kawakami, Tomohiro Chaki, Takahide Yoshiike, Claudio Semini and Daniele Pucci
The paper is under review. The preprint is available in the following link https://arxiv.org/pdf/2409.01144
Accompanying.Video.RAL2024.Elobaid.mp4
The MPC problem formulation for both the humanoid case and the quadruped case are housed in submodules. The code is organized as follows
- examples houses example code and scripts allowing to install and run the MPC and produce plots/simulations for a bipedal and a quadruped.
humanoid-mpc
points to the implementation of the Centroidal MPC (Casadi + IPOPT) with the possibility of setting a flag enabling or disabling the stability constraintsquadruped-mpc
points to the implementation of the Centroidal MPC through ACADOS with the possibility of using different quadruped robots and terrains.
To use the examples in the example directory you can simply run the corresponding run_and_plot.sh
script as in the following
The humanoid example simulates using the Centroidal MPC with the flag enable_stability_cstr
off and then on. It then generates gifs/animation of the data of the footsteps and CoM trajectory in both cases.
The simulation, to test for edge cases, runs the MPC with dt = 200ms
with a horizon length of 5 steps
. In this way we emphasize the role played by the stability constraints in ensuring success as opposed to the nominal case. To run the example you simply do
cd examples/humanoid
chmod +x run_and_plot.sh
./run_and_plot.sh
The above script builds the MPC suite housed in the submodule humanoid-mpc
. Make a build directory for the example in main.cpp
, build and install it, and then run the matlab plotting scripts for the generated data.
If successful, you should be able to see animations of this kind in your build/bin directory
Simulations without (left) and With (right) Stability for a biped | |
---|---|
The quadruped example simulates using the MPC with and without the stability constraints with a quadruped (Aliengo). It produces the simulations using mojoco. To run the example you simply do
cd examples/humanoid
chmod +x run_and_plot.sh
./run_and_plot.sh
You should be able to see something similar to (with obvious difference in performance between nominal and stable centroidal MPC)
paper_test.mp4
Feel free to open issues on this repo for specific questions. If you find this work useful, consider citing it
@article{elobaid2024online,
title={Online Non-linear Centroidal MPC with Stability Guarantees for Robust Locomotion of Legged Robots},
author={Elobaid, Mohamed and Turrisi, Giulio and Rapetti, Lorenzo and Romualdi, Giulio and Dafarra, Stefano and Kawakami, Tomohiro and Chaki, Tomohiro and Yoshiike, Takahide and Semini, Claudio and Pucci, Daniele},
journal={arXiv preprint arXiv:2409.01144},
year={2024}
}
👨💻 @Mohamed Elobaid |