This repo is mainly an addon residual for Crocoddyl for collision avoidance for trajectory optimisation and model predictive control (MPC).
Here's a video of the addon residual in a real time torque controlled 7-DoF manipulator robot:
HPP-FCL & Pinocchio must be built from sources. Build pinocchio with the flag : WITH_COLLISION_SUPPORT=ON.
[!NOTE] Don't forget to switch to the right commits!
Before trying the examples, test your hppfcl installation. To do this and make sure the hppfcl librairy works well on your computer, run in the test folder :
python -m unittest
.
If you have a problem with FakeCollisionGeometry
, it is likely that the linking of Pinocchio with HPPFCL wasn't done properly. Verify that you have the right commits & the right compilation flags.
Create a meshcat-server by writting in a terminal meshcat-server
. Then, to see the example with hard constraints simply run in the main directory python examples/mpc_panda_reaching.py
. To compare it with the standard MPC without hard constraint but collision avoidance written as soft constraint, run python examples/mpc_panda_reaching_soft_constraint.py
.
As the code is still in developpement, the code is constantly moving and sometimes, examples do not work. Hence, do not hesitate to contact me at ahaffemaye@laas.fr.
To cite COLMPC in your academic research, please use the following bibtex entry:
@inproceedings{haffemayer_model_2024,
title = {Model predictive control under hard collision avoidance constraints for a robotic arm},
author = {Haffemayer, Arthur and Jordana, Armand and Fourmy, Médéric and Wojciechowski, Krzysztof and Saurel, Guilhem and Petrík, Vladimír and Lamiraux, Florent and Mansard, Nicolas},
booktitle={Ubiquitous Robots (UR)}
year = {2024},
}
The examples are based on the examples of Sebastien Kleff.