Skip to main content

A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives

Project description

Crocoddyl Logo

Introduction

Crocoddyl is an optimal control library for robot control under contact sequence. Its solvers are based on novel and efficient Differential Dynamic Programming (DDP) algorithms. Crocoddyl computes optimal trajectories along with optimal feedback gains. It uses Pinocchio for fast computation of robots dynamics and their analytical derivatives.

The source code is released under the BSD 3-Clause license.

Authors: Carlos Mastalli and Rohan Budhiraja
Instructors: Nicolas Mansard
With additional support from the Gepetto team at LAAS-CNRS and MEMMO project. For more details see Section Credits

License BSD-3-Clause CI build status pipeline status coverage report GitHub Release Date GitHub tag (latest by date) conda version PyPI conda install conda download contributors GitHub last commit GitHub repo size

If you want to follow the current developments, you can directly refer to the devel branch. If you want to directly dive into Crocoddyl, only one single line is sufficient

conda install crocoddyl -c conda-forge

and if you prefer pip (in Python 3 or 2):

pip install --user crocoddyl

Installation

Crocoddyl can be easily installed on various Linux (Ubuntu, Fedora, etc.) and Unix distributions (Mac OS X, BSD, etc.).

Crocoddyl features

Crocoddyl is versatible:

  • various optimal control solvers (DDP, FDDP, BoxFDDP, Ipopt, etc) - single and multi-shooting methods
  • analytical and sparse derivatives via Pinocchio
  • Euclidian and non-Euclidian geometry friendly via Pinocchio
  • handle autonomous and nonautomous dynamical systems
  • numerical differentiation support
  • automatic differentiation support via CppAD

Crocoddyl is efficient and flexible:

  • cache friendly,
  • multi-thread friendly
  • Python bindings (including models and solvers abstractions) via Boost Python
  • C++ 14/17/20 compliant
  • extensively tested
  • automatic code generation support via CppADCodeGen

Installation through robotpkg

You can install this package through 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 (or py3X for python 3.X, depending on your system):

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.

  1. 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
  1. Register the authentication certificate of robotpkg:
curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
  1. You need to run at least once apt update to fetch the package descriptions:
sudo apt-get update
  1. The installation of Crocoddyl:
sudo apt install robotpkg-py36-crocoddyl # for Python 3

sudo apt install robotpkg-py27-crocoddyl # for Python 2

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

Building from source

Crocoddyl is c++ library with Python bindings for versatile and fast prototyping. It has the following dependencies:

You can run examples, unit-tests and benchmarks from your build dir:

cd build
make test
make -s examples-quadrupedal_gaits INPUT="display plot" # enable display and plot
make -s benchmarks-cpp-quadrupedal_gaits INPUT="100 walk" # number of trials ; type of gait

Alternatively, you can see the 3D result and/or graphs of your run examples (through gepetto-viewer and matplotlib), you can use

export CROCODDYL_DISPLAY=1
export CROCODDYL_PLOT=1

After installation, you could run the examples as follows:

python -m crocoddyl.examples.quadrupedal_gaits "display" "plot" # enable display and plot

If you want to learn about Crocoddyl, take a look at the Jupyter notebooks. Start in the following order.

Documentation

The documentation of Crocoddyl of its last release is available here.

Citing Crocoddyl

To cite Crocoddyl in your academic research, please use the following bibtex lines:

@inproceedings{mastalli20crocoddyl,
  author={Mastalli, Carlos and Budhiraja, Rohan and Merkt, Wolfgang and Saurel, Guilhem and Hammoud, Bilal
  and Naveau, Maximilien and Carpentier, Justin and Righetti, Ludovic and Vijayakumar, Sethu and Mansard, Nicolas},
  title={{Crocoddyl: An Efficient and Versatile Framework for Multi-Contact Optimal Control}},
  booktitle = {IEEE International Conference on Robotics and Automation (ICRA)},
  year={2020}
}

and the following one to reference this website:

@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://github.com/loco-3d/crocoddyl/wikis/home},
   year = {2019}
}

Crocoddyl contributions go beyond efficient software implementation as well. Please also consider to cite the algorithm contributions of our different solvers and formulations:

  • Feasibility-driven DDP (FDDP): [1]
  • Control-limited feasibility-driven DDP (Box-FDDP): [2]
  • Multi-phase rigid optimal control: [3]

Finally, please also consider citing Pinocchio, which contributes to the efficient implementation of rigid body algorithms and their derivatives. For more details how to cite Pinocchio visit: https://github.com/stack-of-tasks/pinocchio.

Below, there is list of the selected publications that describe different components of Crocoddyl. For a complete list see PUBLICATIONS.md.

Selected publications

[1] C. Mastalli, R. Budhiraja, W. Merkt, G. Saurel, B. Hammoud, M. Naveau, J. Carpentier, L. Righetti, S. Vijayakumar and N. Mansard. Crocoddyl: An Efficient and Versatile Framework for Multi-Contact Optimal Control, IEEE International Conference on Robotics and Automation (ICRA), 2020

[2] C. Mastalli, W. Merkt, J. Marti-Saumell, H. Ferrolho, J. Sola, N. Mansard, S. Vijayakumar. A Direct-Indirect Hybridization Approach to Control-Limited DDP, 2021

[3] 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

Questions and Issues

You have a question or an issue? You may either directly open a new issue or use the mailing list crocoddyl@laas.fr.

Steering Committee

Crocoddyl is being managed by a steering committee which meets every two weeks to discuss the ongoing developments.

The committee is being led by Carlos Mastalli (University of Edinburgh) and Rohan Budhiraja (LAAS-CNRS). Nicolas Mansard (LAAS-CNRS), Guilhem Saurel (LAAS-CNRS) and Justin Carpentier (INRIA) are other members of the committee.

Credits

The following people have been involved in the development of Crocoddyl:

Acknowledgments

The development of Crocoddyl is supported by the EU MEMMO project, and the EU RoboCom++ project. It is maintained by the Gepetto team @LAAS-CNRS, the Robot Motor Intelligence (RoMI) Lab @Heriot-Watt University, and the Willow team @INRIA.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

crocoddyl-1.9.0.2-0-cp311-cp311-manylinux_2_17_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

crocoddyl-1.9.0.2-0-cp311-cp311-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

crocoddyl-1.9.0.2-0-cp310-cp310-manylinux_2_17_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

crocoddyl-1.9.0.2-0-cp310-cp310-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

crocoddyl-1.9.0.2-0-cp39-cp39-manylinux_2_17_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

crocoddyl-1.9.0.2-0-cp39-cp39-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

crocoddyl-1.9.0.2-0-cp38-cp38-manylinux_2_17_x86_64.whl (6.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

crocoddyl-1.9.0.2-0-cp38-cp38-macosx_10_9_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

crocoddyl-1.9.0.2-0-cp37-cp37m-manylinux_2_17_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

crocoddyl-1.9.0.2-0-cp37-cp37m-macosx_10_16_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.7mmacOS 10.16+ x86-64

File details

Details for the file crocoddyl-1.9.0.2-0-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 68bec5b04f1699e40fd3aceeac11167cd614869eebc1abce4ded7dac9f41d1fc
MD5 d5dcb8615cc507f7c0cdc0c613836c0a
BLAKE2b-256 9460cbdcb0ba7cb7e4b109f46c0d862c750c9fe335fc4741f22d51e11ff884e0

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cff5318b7ab03f0106543dc1acfd04f23dd522a5937917223447827dcebbb06c
MD5 f45ec9807e7cd57712bc8e39b20c0054
BLAKE2b-256 55291377e77949d70559f356853b4b82668daf435ccb55329485e123a037e5e8

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ce2e8f1da046f9cb7928c860b038c1a7d667b2de2f5387ba7f2bbd611647f38a
MD5 7e1a5ef5216f787666f90879986327ee
BLAKE2b-256 382c10b946b85755f70ecc1e14286db82eeffb772db90a2f3522817e716c17e6

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 677d95de5a0b5d9d1d81ac1c1854a95996e1bc0f8b0f85446abdd2b5ffcf6ef7
MD5 cbb9e53c807c5ef056b5e649b8db2848
BLAKE2b-256 9e89af3f8eb6dbaac1ec9721312c44b908e26338c0cdb921b90c02fbf0abaea7

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp39-cp39-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp39-cp39-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 191b588834fbd45d532b6849a17c5c8b93c4430a4f36561579c2cb3f65df0161
MD5 1f8db7757daf315d20d66bac23a5ce1d
BLAKE2b-256 bb7cc3c61fb04535aea0f5bfee3f70461913947d14fd28297a020b0b6e4a53b5

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 75213a1d60de03f4dc3e4c8b0acfb4763405e38003957c323495266df88ae4c4
MD5 b0d4aa47a451a04133ebcb0660aa3364
BLAKE2b-256 94343c14a50a41010ea98383631b9777bdf3d292e32939d20f4c62dab352b7f0

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp38-cp38-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp38-cp38-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7b2039d3cb69fd928b8e19cb2ce71244b56f4c2cc3cee72bb7de78df7c14f014
MD5 d612f666fb0e9e740d4fc8af951cf9d3
BLAKE2b-256 621d2c42624b9c9a47707e353dbb0a03a5f75aa1817674cbe7b0607e54d02e3e

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b762f274c2360d7c9a45451bde7e41b2a34a33745167015fe3067a510169c028
MD5 beee70691767451e4580c0293210278b
BLAKE2b-256 9ba76663caa3749f771064ac0a311f5272b3c33065985346f58120958a409dca

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp37-cp37m-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp37-cp37m-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ca39d59e103daafd536562feb786980d7b87845862d0751c30aa3428d9035d6f
MD5 44a3533ae6451842f4303b71089cd8a6
BLAKE2b-256 0b74006e0f12d1d9a88fbdbf1b6d5e1ebd8550c42f7656c0602cf3d850715d21

See more details on using hashes here.

File details

Details for the file crocoddyl-1.9.0.2-0-cp37-cp37m-macosx_10_16_x86_64.whl.

File metadata

File hashes

Hashes for crocoddyl-1.9.0.2-0-cp37-cp37m-macosx_10_16_x86_64.whl
Algorithm Hash digest
SHA256 0eea949ba9aec622461f54dde92e2e66bf30f80e98149c3099e5f7f923fe6f6e
MD5 26f3be40963e40b98530fc56799d8c51
BLAKE2b-256 1c4d6c7d3b01377d9be414d0f82d13c236a2fb6fb4ffa08a583b5d70cee84333

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page