Skip to main content

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

Project description

Crocoddyl Logo

Documentation AUR package nixpkgs stable 24.05 package nixpkgs unstable package Code style: black

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 and feedback gains. It uses Pinocchio for fast computation of robot dynamics and analytical derivatives.

If you want to learn more about Crocoddyl and its solvers, we suggest reading [1] [2] [3] and visiting PUBLICATIONS.md. If you want to follow the current developments and contribute, please directly refer to the devel branch.

:crocodile: Crocoddyl features

Crocoddyl is versatile:

  • Various optimal control solvers (DDP, FDDP, BoxFDDP, Ipopt, etc)
  • Analytical and sparse derivatives via Pinocchio
  • Differential geometry support leveraging Pinocchio
  • Various integrators, dynamics, costs and constraints
  • Numerical differentiation support
  • Automatic differentiation support via CppAD

Crocoddyl is efficient and flexible:

  • Cache friendly
  • Multi-threading support via OpenMP
  • Python bindings (including abstractions) via Boost Python
  • C++11/14/17/20 compliant
  • Extensively tested
  • Code generation in both C++ and Python via CppADCoGen

:penguin: Installation

Crocoddyl can be easily installed on various Linux (Ubuntu, Fedora, etc.) and Unix distributions (Mac OS X, BSD, etc.). Below, there are different ways to install Crocoddyl.

On ArchLinux

With your favorite AUR helper, eg. paru:

    paru -Syu crocoddyl

:dragon: From

Just run the following command in the terminal:

   conda install crocoddyl -c conda-forge

Conda installation supports conda install.

From Nix

crocoddyl & python3Packages.crocoddyl are available in nixpkgs.

This repository is also a flake, so you may:

  • run a python shell with crocoddyl: nix run github:loco-3d/crocoddyl
  • use it in your own flake: crocoddyl.url = "github:loco-3d/crocoddyl";

The build cache use by CI and developers is gepetto.cachix.org

:snake: From

Just run the following command in the terminal:

  pip install --user crocoddyl

:turtle: With ROS

Just clone it (with --recursive) into a catkin workspace and compile it.

:package: From Debian / Ubuntu packages, with robotpkg

  1. If you have never added robotpkg's software repository, do it now:
    sudo tee /etc/apt/sources.list.d/robotpkg.list <<EOF
    deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -sc) robotpkg
    EOF
    
    curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | sudo apt-key add -
    sudo apt update
    
  2. Install Crocoddyl and its Python bindings:
    sudo apt install robotpkg-py3\*-crocoddyl
    
  3. Configure your environment variables:
    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/python3.10/site-packages:$PYTHONPATH
    

:file_folder: From source

  1. Install Crocoddyl's mandatory dependencies:
  2. (optional) Install Crocoddyl's optional dependencies
    • OpenMP                                        (for multi-threading support)
    • CppADCoGen                                (for code-generation support)
    • pycppad                                        (for code-generation support)
    • Ipopt                                              (for Ipopt support)
    • example-robot-data                      (for robotic examples, install Python loaders)
    • gepetto-viewer-corba                   (for display in Gepetto viewer, i.e., GepettoDisplay)
    • meshcat-python                            (for display in Meshcat, i.e., MeshcatDisplay)
    • whole_body_state_rviz_plugin      (for display in ROS, i.e., RvizDisplay)
    • crocoddyl_msgs                            (for display in ROS, i.e., RvizDisplay)
    • urdf_parser_py                              (for display in ROS, i.e., RvizDisplay)
    • jupyter                                            (for notebooks)
    • matplotlib                                       (for plotting)
  3. Clone it (with --recursive), create a build directory inside, and:
    cmake .. && make && make install
    

You can disable the tests, examples, and benchmarks using the following CMake options: BUILD_TESTING, BUILD_EXAMPLES, and BUILD_BENCHMARK. Note that the tests, examples or benchmarks require example-robot-data.

:mag: Documentation

Crocoddyl's Doxygen documentation is available here. Alternatively, you can also check out the Jupyter notebooks. We suggest to explore at least these notebooks:

Moreover, after installation, you could run the examples as follows:

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

or run examples, unit tests and benchmarks from your build directory as

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

where it is possible to enable display and/or plots generated by our examples using the environment variables:

export CROCODDYL_DISPLAY=1
export CROCODDYL_PLOT=1

:telescope: 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}
}

Please consider citing our selected publications and contributions described in PUBLICATIONS.md.

Crocoddyl's contributions extend beyond efficient software development. Please also consider citing the algorithm contributions of our different solvers and formulations:

  • Feasibility-driven solvers (FDDP and Box-FDDP): [1], [2]
  • Inverse-dynamics trajectory optimization and endpoint constrains: [3] [4]
  • Multi-Contact Inertial Parameters Estimation and Localization in Legged Robots: [5]

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

:open_book: 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 and S. Vijayakumar. A Feasibility-Driven Approach to Control-Limited DDP, Autonomous Robots, 2022.

[3] C. Mastalli, S. P. Chhatoi, T. Corbères, S. Tonneau and S. Vijayakumar. Inverse-Dynamics MPC via Nullspace Resolution, IEEE Transactions on Robotics, 2023.

[4] M. Parilli, S. Martinez, and C.Mastall. Endpoint-Explicit Differential Dynamic Programming via Exact Resolution, IEEE International Conference on Robotics and Automation (ICRA), 2025.

[5] S. Martinez, R. Griffin, and C.Mastalli. Multi-Contact Inertial Parameters Estimation and Localization in Legged Robots, IEEE Robotics and Automation Letters (RAL), 2025.

:computer: Questions and Issues

You have a question or an issue? Please open a new issue or a discussion.

:copyright: Credits

:writing_hand: Written by

:construction_worker: With contributions from

:trophy: Acknowledgments

Crocoddyl development was supported by the EU MEMMO project and the EU RoboCom++ project. It is maintained by the Robot Motor Intelligence (RoMI) Lab @ Heriot-Watt University, the Gepetto team @ LAAS-CNRS, 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 Distribution

libcrocoddyl-3.2.0.tar.gz (751.8 kB view details)

Uploaded Source

Built Distributions

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

libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_aarch64.whl (4.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

libcrocoddyl-3.2.0-1-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

libcrocoddyl-3.2.0-1-py3-none-macosx_10_9_x86_64.whl (3.2 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_aarch64.whl (4.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

libcrocoddyl-3.2.0-0-py3-none-macosx_11_0_arm64.whl (2.7 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

libcrocoddyl-3.2.0-0-py3-none-macosx_10_9_x86_64.whl (3.2 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file libcrocoddyl-3.2.0.tar.gz.

File metadata

  • Download URL: libcrocoddyl-3.2.0.tar.gz
  • Upload date:
  • Size: 751.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for libcrocoddyl-3.2.0.tar.gz
Algorithm Hash digest
SHA256 4f81e23a1fb185dba3cecb5f8d2630792d9dee1d6d4d3f1e55661ca704dc6f60
MD5 868c96b2ae429179c899b7b6a605c076
BLAKE2b-256 668d4bf1c0314c23b12699fca110db6cb9111fdabaf90fea2aeee30cf65d85e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0.tar.gz:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 346bd344ea400aa6e917ea78be64d7acfca0214dc452ce8981ff699dc9f27442
MD5 6cde8ef5895c143ebac9aca383c31247
BLAKE2b-256 12164298e3595451f8822d35e59d505cb0499fa0dce6b0a0eb0b622dc84ec15e

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7e12f2848ad8ae1061c9efae4589ef117a4cf31c71f1265d1a0594d91ab6aa08
MD5 42e95c6e259bb68050cf0e826d34b5b2
BLAKE2b-256 0a7be2572a9d038031afe3fa1003e2a332058064c6ae268efae5d4e72d13215d

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-1-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0769770ab9d2edd8fae010589ecb7461a8c40fc55c2c4aff602e4e6e817296f1
MD5 052c8ae019b0362f263df10b596314c5
BLAKE2b-256 0c6c5a63edd1ff37fe9c226fcbcfc6ea9bbbd2dacaa553d1e3b2e5cbc856810f

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-1-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-1-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-1-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d8736a0578ef69cbf347ca99f6bd131798e16d07e42e732d37e6bb6e889dfdd7
MD5 08658189f032df0fc71dca4069b46933
BLAKE2b-256 778b2ee296c4f6cd9176bab25539e4c4e5fa8f133dc65f55ffae99b5e12797f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-1-py3-none-macosx_10_9_x86_64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5b59d05fa92c9d2f9ba1634761a6588d3efccbb094731c72e22a2e7a64e0d63
MD5 7ce3ed078e41b18e8106389645eb98df
BLAKE2b-256 763f0253a8000bda2a41462e83d473880f574d804f682b20a5802ebb3170aa0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f9f844efc1c8413c8676d3bed5349a89fbe5a116646e1eb714849a2547b37bc2
MD5 06623d5ab9c8b0f815cdf530d67bb287
BLAKE2b-256 a5a575d537f218ccf994d97010a1dfff36ef0c5c56706979bc13a7f9a20455da

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-0-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b31515104c3e0e0b22ccf47644af905f321bf9517ce0ea31cf06c40d6463487
MD5 cff43d5eb0f139fa65b313402c6cd233
BLAKE2b-256 5733f1646dfa00134ce8fe9416ec8c5793a55ba6303d4259ba78a4c3dd628ef7

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libcrocoddyl-3.2.0-0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for libcrocoddyl-3.2.0-0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 677d9308a2e989e268c871b5c9b0be78c76a98ba8795a3436800a2805823d57b
MD5 45cf92d4e541df855dedf4e040ca7e16
BLAKE2b-256 fbc9340d4c9e27bbcc0a4ae6023ed7a70e1721b24e01e540ea9dafde2fb4f509

See more details on using hashes here.

Provenance

The following attestation bundles were made for libcrocoddyl-3.2.0-0-py3-none-macosx_10_9_x86_64.whl:

Publisher: release.yml on cmake-wheel/libcrocoddyl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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