Home

Awesome

<p align="center"> <img src="https://raw.githubusercontent.com/stack-of-tasks/pinocchio/master/doc/images/pinocchio-logo-large.png" width="800" alt="Pinocchio Logo" align="center"/> </p> <p align="center"> <a href="https://opensource.org/licenses/BSD-2-Clause"><img src="https://img.shields.io/badge/License-BSD%202--Clause-green.svg" alt="License"/></a> <a href="https://gepettoweb.laas.fr/doc/stack-of-tasks/pinocchio/master/doxygen-html/"><img src="https://img.shields.io/badge/docs-online-brightgreen" alt="Documentation"/></a> <a href="http://projects.laas.fr/gepetto/doc/stack-of-tasks/pinocchio/master/coverage/"><img src="https://gepgitlab.laas.fr/stack-of-tasks/pinocchio/badges/master/coverage.svg?job=doc-coverage" alt="Coverage Report"/></a> <a href="https://anaconda.org/conda-forge/pinocchio"><img src="https://img.shields.io/conda/dn/conda-forge/pinocchio.svg" alt="Conda Downloads"/></a> <a href="https://anaconda.org/conda-forge/pinocchio"><img src="https://img.shields.io/conda/vn/conda-forge/pinocchio.svg" alt="Conda Version"/></a> <a href="https://badge.fury.io/py/pin"><img src="https://badge.fury.io/py/pin.svg" alt="PyPI version" height="20"></a> <a href="https://badge.fury.io/py/pin"><img src="https://results.pre-commit.ci/badge/github/stack-of-tasks/pinocchio/master.svg" alt="pre-commit.ci status" height="20"></a> <br> <!--<a href="https://gitlab.laas.fr/stack-of-tasks/pinocchio"><img src="https://gitlab.laas.fr/stack-of-tasks/pinocchio/badges/master/pipeline.svg" alt="Pipeline Status"></a>--> </p> <!--Pinocchio: a C++ library for efficient Rigid Multi-body Dynamics computations =========== -->

Pinocchio instantiates the state-of-the-art Rigid Body Algorithms for poly-articulated systems based on revisited Roy Featherstone's algorithms. Besides, Pinocchio provides the analytical derivatives of the main Rigid-Body Algorithms, such as the Recursive Newton-Euler Algorithm or the Articulated-Body Algorithm.

Pinocchio was first tailored for robotics applications, but it can be used in other contexts (biomechanics, computer graphics, vision, etc.). It is built upon Eigen for linear algebra and FCL for collision detection. Pinocchio comes with a Python interface for fast code prototyping, directly accessible through Conda.

Pinocchio is now at the heart of various robotics software as Crocoddyl, an open-source and efficient Differential Dynamic Programming solver for robotics, the Stack-of-Tasks, an open-source and versatile hierarchical controller framework or the Humanoid Path Planner, open-source software for Motion and Manipulation Planning.

If you want to learn more about Pinocchio internal behaviors and main features, we invite you to read the related paper and the online documentation.

If you want to dive into Pinocchio directly, only one single line is sufficient (assuming you have Conda):

<p align="center"> <strong> conda install pinocchio -c conda-forge </strong> </p>

or via pip (currently only available on Linux):

<p align="center"> <strong> pip install pin </strong> </p>

Table of contents

Introducing Pinocchio 3

Pinocchio3 is the latest major release of Pinocchio. It comes with multiple new features, such as:

Pinocchio main features

Pinocchio is fast:

Pinocchio is versatile, implementing basic and more advanced rigid body dynamics algorithms:

Pinocchio is flexible:

Pinocchio is extensible. Pinocchio is multi-thread friendly. Pinocchio is reliable and extensively tested (unit-tests, simulations, and real-world robotics applications). Pinocchio is supported and tested on Windows, Mac OS X, Unix, and Linux (see build status here).

Documentation

The online Pinocchio documentation of the last release is available here. A cheat sheet pdf with the main functions and algorithms can be found here.

Examples

In the examples directory, we provide some basic examples of using Pinocchio in Python. Additional examples introducing Pinocchio are also available in the documentation.

Tutorials

Pinocchio comes with a large bunch of tutorials aiming at introducing the basic tools for robot control. Tutorial and training documents are listed here. You can also consider the interactive Jupyter notebook set of tutorials developed by Nicolas Mansard and Yann de Mont-Marin.

Pinocchio continuous integrations

Pinocchio is constantly tested for several platforms and distributions, as reported below:

<p align="center"> <table class="center"> <!-- <tr> <td> Continuous Integration </td></tr>--> <tr><td> CI on ROS </td> <td><a href="https://github.com/stack-of-tasks/pinocchio/actions/workflows/ros-ci.yml"><img alt="ROS" src="https://github.com/stack-of-tasks/pinocchio/actions/workflows/ros-ci.yml/badge.svg?branch=devel" /></a></td> </tr><tr><td> CI on Linux via APT </td> <td><a href="https://github.com/stack-of-tasks/pinocchio/actions/workflows/linux.yml"><img alt="linux" src="https://github.com/stack-of-tasks/pinocchio/actions/workflows/linux.yml/badge.svg?branch=devel" /></a></td> </tr><tr><td> CI on OSX via Conda </td> <td><a href="https://github.com/stack-of-tasks/pinocchio/actions/workflows/macos-linux-conda.yml"><img alt="mac" src="https://github.com/stack-of-tasks/pinocchio/actions/workflows/macos-linux-conda.yml/badge.svg?branch=devel" /></a></td> </tr><tr><td> CI on Windows via Conda </td> <td><a href="https://github.com/stack-of-tasks/pinocchio/actions/workflows/windows-conda.yml"><img alt="windows" src="https://github.com/stack-of-tasks/pinocchio/actions/workflows/windows-conda.yml/badge.svg?branch=devel" /></a></td> </tr><tr><td> CI on Linux via Robotpkg </td> <td><img src="https://gitlab.laas.fr/stack-of-tasks/pinocchio/badges/master/pipeline.svg" alt="Pipeline Status"></td> </tr> </table> </p>

Performances

Pinocchio exploits, at best, the sparsity induced by the kinematic tree of robotics systems. Thanks to modern programming language paradigms, Pinocchio can unroll most of the computations directly at compile time, allowing to achieve impressive performances for a large range of robots, as illustrated by the plot below, obtained on a standard laptop equipped with an Intel Core i7 CPU @ 2.4 GHz.

<p align="center"> <img src="https://raw.githubusercontent.com/stack-of-tasks/pinocchio/master/doc/images/pinocchio-performances.png" width="600" alt="Pinocchio Logo" align="center"/> </p>

For other benchmarks, and mainly the capacity of Pinocchio to exploit, at best, your CPU capacities using advanced code generation techniques, we refer to the technical paper. In addition, the introspection may also help you to understand and compare the performances of the modern rigid body dynamics libraries.

Ongoing developments

If you want to follow the current developments, you can directly refer to the devel branch. The master branch only contains the latest release. Any new Pull Request should then be submitted on the devel branch.

Installation

Pinocchio can be easily installed on various Linux (Ubuntu, Fedora, etc.) and Unix distributions (Mac OS X, BSD, etc.). Please refer to the installation procedure.

Conda

You simply need this simple line:

conda install pinocchio -c conda-forge

ROS

Pinocchio is also deployed on ROS. You may follow its deployment status below.

If you're interested in using Pinocchio on systems and/or with packages that integrate with the ROS ecosystem, we recommend the installation of Pinocchio via the binaries distributed via the ROS PPA. Here, you can install Pinocchio using:

sudo apt install ros-$ROS_DISTRO-pinocchio

This installs Pinocchio with HPP-FCL support and with Python bindings. You can then use Pinocchio in your ROS packages by:

We include support and hooks to discover the package for both ROS 1 and ROS 2. Examples can be found at the following repositories:

Please note that we always advise including the pinocchio/fwd.hpp header as the first include to avoid compilation errors from differing Boost-variant sizes.

ROS 1    ROS 2
Melodic    Foxy
Noetic    Galactic
    Humble
    Rolling

Visualization

Pinocchio provides support for many open-source and free visualizers:

Many external viewers can also be integrated. For more information, see the example here.

Citing Pinocchio

To cite Pinocchio in your academic research, please consider citing the software paper and use the following BibTeX entry:

@inproceedings{carpentier2019pinocchio,
   title={The Pinocchio C++ library -- A fast and flexible implementation of rigid body dynamics algorithms and their analytical derivatives},
   author={Carpentier, Justin and Saurel, Guilhem and Buondonno, Gabriele and Mirabel, Joseph and Lamiraux, Florent and Stasse, Olivier and Mansard, Nicolas},
   booktitle={IEEE International Symposium on System Integrations (SII)},
   year={2019}
}

And the following one for the link to the GitHub codebase:

@misc{pinocchioweb,
   author = {Justin Carpentier and Florian Valenza and Nicolas Mansard and others},
   title = {Pinocchio: fast forward and inverse dynamics for poly-articulated systems},
   howpublished = {https://stack-of-tasks.github.io/pinocchio},
   year = {2015--2021}
}

Citing specific algorithmic contributions

Pinocchio goes beyond implementing the standard rigid-body dynamics algorithms and results from active research on simulation, learning and control. Pinocchio provides state-of-the-art algorithms for handling constraints, differentiating forward and inverse dynamics, etc. If you use these algorithms, please consider citing them in your research articles.

Questions and Issues

Do you have a question or an issue? You may either directly open a new question or a new issue or, directly contact us via the mailing list pinocchio@inria.fr.

Credits

The following people have been involved in the development of Pinocchio and are warmly thanked for their contributions:

If you have participated in the development of Pinocchio, please add your name and contribution to this list.

Open-source projects relying on Pinocchio

Acknowledgments

The development of Pinocchio is actively supported by the Gepetto team @LAAS-CNRS and the Willow team @INRIA.