Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on an efficient Differential Dynamic Programming (DDP) algorithm. Crocoddyl computes optimal trajectories along to optimal feedback gains. It uses Pinocchio for fast computation of robot dynamics and its analytical derivatives.
The source code is released under the BSD 3-Clause license.
Authors: Carlos Mastalli and Rohan Budhiraja
Instructors: Justin Carpentier and Nicolas Mansard
With additional support from the Gepetto team at LAAS-CNRS.
If you want to follow the current developments, you can directly refer to the devel branch.
Crocoddyl can be easily installed on various Linux (Ubuntu, Fedora, etc.) and Unix distributions (Mac OS X, BSD, etc.). Please refer to
You can install this package throught robotpkg. robotpkg is a package manager tailored for robotics softwares. It greatly simplifies the release of new versions along with the management of their dependencies. You just need to add the robotpkg apt repository to your sources.list and then use sudo apt install robotpkg-py27-crocoddyl
:
If you have never added robotpkg as a softwares repository, please follow first the instructions from 1 to 3. Otherwise, go directly to instruction 4. Those instructions are similar to the installation procedures presented in http://robotpkg.openrobots.org/debian.html.
-
Add robotpkg as source repository to apt:
sudo tee /etc/apt/sources.list.d/robotpkg.list <<EOF deb [arch=amd64] http://robotpkg.openrobots.org/wip/packages/debian/pub $(lsb_release -sc) robotpkg deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg EOF
-
Register the authentication certificate of robotpkg:
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
-
You need to run at least once apt update to fetch the package descriptions:
sudo apt-get update
-
The installation of Crocoddyl:
sudo apt install robotpkg-py27-crocoddyl # for Python 2 sudo apt install robotpkg-py35-crocoddyl # for Python 3
Finally you will need to configure your environment variables, e.g.:
export PATH=/opt/openrobots/bin:$PATH
export PKG_CONFIG_PATH=/opt/openrobots/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/openrobots/lib/python2.7/site-packages:$PYTHONPATH
Crocoddyl is c++ library with Python bindings for versatible and fast prototyping. It has the following dependecies:
- pinocchio
- quadprog
- multicontact-api
- example-robot-data (optional for running examples, install Python loaders)
- gepetto-viewer-corba (optional for running examples and notebooks)
- jupyter (optional for running notebooks)
- matplotlib (optional for running examples)
You can run examples and tests from the root dir of the repository:
cd PATH_TO_CROCODDYL
python examples/talos_arm.py
python unittest/all.py
If you want to learn about Crocoddyl, take a look at the Jupyter notebooks. Start in the following order.
- examples/notebooks/unicycle_towards_origin.ipynb
- examples/notebooks/cartpole_swing_up.ipynb
- examples/notebooks/manipulator.ipynb
- examples/notebooks/bipedal_walking_from_foot_traj.ipynb
- examples/notebooks/introduction_to_crocoddyl.ipynb
To cite Crocoddyl in your academic research, please use the following bibtex lines:
@misc{crocoddylweb,
author = {Carlos Mastalli, Rohan Budhiraja and Nicolas Mansard and others},
title = {Crocoddyl: a fast and flexible optimal control library for robot control under contact sequence},
howpublished = {https://gepgitlab.laas.fr/loco-3d/crocoddyl/wikis/home},
year = {2019}
}
and the following paper describes different algorithm implemented in Crocoddyl:
- R. Budhiraja, J. Carpentier, C. Mastalli and N. Mansard. Differential Dynamic Programming for Multi-Phase Rigid Contact Dynamics, IEEE RAS International Conference on Humanoid Robots (ICHR), 2018
- Y. Tassa, N. Mansard, E. Todorov. Control-Limited Differential Dynamic Programming, IEEE International Conference on Automation and Robotics (ICRA), 2014
- R. Budhiraja, J. Carpentier and N. Mansard. Dynamics Consensus between Centroidal and Whole-Body Models for Locomotion of Legged Robots, IEEE International Conference on Automation and Robotics (ICRA), 2019
You have a question or an issue? You may either directly open a new issue or use the mailing list [email protected].