SkillAgentSearch skills...

Crocoddyl

Crocoddyl is an optimal control library for robot control under contact sequence. Its solver is based on various efficient Differential Dynamic Programming (DDP)-like algorithms

Install / Use

/learn @loco-3d/Crocoddyl

README

<p align="center"> <img src="./doc/images/crocoddyl_logo.png" width="800" alt="Crocoddyl Logo" align="center"/> </p> <p align="center"> <a href="https://gepettoweb.laas.fr/doc/loco-3d/crocoddyl/master/doxygen-html/"><img src="https://img.shields.io/badge/docs-online-brightgreen" alt="Documentation"/></a> <a href="https://gepgitlab.laas.fr/loco-3d/crocoddyl/pipelines?ref=devel"><img src="https://gepgitlab.laas.fr/loco-3d/crocoddyl/badges/devel/pipeline.svg"> <a href="https://gepettoweb.laas.fr/doc/loco-3d/crocoddyl/devel/coverage/"><img src="https://gepgitlab.laas.fr/loco-3d/crocoddyl/badges/devel/coverage.svg"> <a href="https://repology.org/project/crocoddyl/versions"><img src="https://repology.org/badge/version-for-repo/aur/crocoddyl.svg" alt="AUR package"></a> <a href="https://anaconda.org/conda-forge/crocoddyl"><img src="https://img.shields.io/conda/vn/conda-forge/crocoddyl.svg"> <a href="https://repology.org/project/crocoddyl/versions"><img src="https://repology.org/badge/version-for-repo/nix_stable_24_05/crocoddyl.svg" alt="nixpkgs stable 24.05 package"></a> <a href="https://repology.org/project/crocoddyl/versions"><img src="https://repology.org/badge/version-for-repo/nix_unstable/crocoddyl.svg" alt="nixpkgs unstable package"></a> <a href="https://pypi.org/project/crocoddyl/"><img src="https://badge.fury.io/py/crocoddyl.svg"> <a href="https://anaconda.org/conda-forge/crocoddyl"><img src="https://anaconda.org/conda-forge/crocoddyl/badges/downloads.svg"> <a href="https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29#fulltext"><img src="https://img.shields.io/badge/license-BSD--3--Clause-blue.svg?style=flat"> <!-- <a href="https://github.com/loco-3d/crocoddyl/graphs/contributors"><img src="https://img.shields.io/github/contributors/loco-3d/crocoddyl"> --> <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /></a> </p>

<img align="center" height="20" src="https://i.imgur.com/vAYeCzC.png"/> Introduction

<img align="right" src="https://i.imgur.com/o2LfbDq.gif" width="25%"/>

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

<table > <tr> <td align="left"><img src="https://cmastalli.github.io/assets/img/publications/highly_dynamic_maneuvers.png" width="10000"/></td> <td align="right"><img src="https://i.imgur.com/RQR2Ovx.gif"/> <img src="https://i.imgur.com/kTW0ePh.gif"/></td> </tr> </table>

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.

<img src="https://aur.archlinux.org/static/images/favicon.ico" height="18" /> On ArchLinux

With your favorite AUR helper, eg. paru:

    paru -Syu crocoddyl

:dragon: From <img src="https://s3.amazonaws.com/conda-dev/conda_logo.svg" height="18">

Just run the following command in the terminal:

   conda install crocoddyl -c conda-forge

Conda installation supports conda install.

<img src="https://avatars.githubusercontent.com/u/487568" height="18" /> 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 <img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4-K6Sjm4--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://cdn-images-1.medium.com/max/1600/1%2A_Wkc-WkNu6GJAAQ26jXZOg.png" height="22">

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                               &nbsp
View on GitHub
GitHub Stars1.2k
CategoryDevelopment
Updated3d ago
Forks205

Languages

C++

Security Score

100/100

Audited on Mar 24, 2026

No findings