Skip to main content

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

Project description

Pinocchio Logo

License Documentation Coverage Report Conda Downloads Conda Version PyPI version pre-commit.ci status

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):

conda install pinocchio -c conda-forge

or via pip (currently only available on Linux):

pip install pin

Table of contents

Pinocchio main features

Pinocchio is fast:

  • C++ template library,
  • cache friendly,
  • support custom scalar type.

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

  • forward kinematics and its analytical derivatives,
  • forward/inverse dynamics and their analytical derivatives,
  • centroidal dynamics and its analytical derivatives,
  • computations of kinematic and dynamic regressors for system identification and more,
  • full support of closed-loop mechanisms,
  • state-of-the-art frictional contact solvers,
  • low-complexity constrained articulated body algorithms,
  • sparse constrained dynamics and its analytical derivatives,
  • full support of multiple-precision floating-point (MPFR) in Python and C++,
  • support of modern and open-source Automatic Differentiation frameworks like CppAD or CasADi,
  • automatic code generation support is available via CppADCodeGen.

Pinocchio can create Multi-body system from:

  • URDF file,
  • SDF file,
  • MJCF file,
  • SRDF file to add frame and contact.

Pinocchio is flexible:

  • header only,
  • C++ 11/14/17/20 compliant.

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:

CI on ROS ROS
CI on Linux via APT linux
CI on macOS and Windows via Pixi mac
CI on Linux via Robotpkg Pipeline Status

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 an extensive range of robots, as illustrated by the plot below, obtained on a standard laptop equipped with an Intel Core i7 CPU @ 2.4 GHz.

Pinocchio Logo

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 refer to the devel branch. The devel branch only contains the latest release. Any new Pull Request should 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 Coal support for collision checking and with Python bindings. You can then use Pinocchio in your ROS packages by:

  • Depending on Pinocchio in your package.xml config (<depend>pinocchio</depend>)
  • Including Pinocchio via CMake (find_package(pinocchio REQUIRED)) and linking against Pinocchio (target_link_libraries(my_library pinocchio::pinocchio))

We include support and hooks to discover the package for ROS build systems. A ROS 2 example can be found in this repository.

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 2 Distro Build Status
Humble
Jazzy
Kilted
Rolling

Visualization

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

  • Gepetto Viewer: a C++ viewer based on OpenSceneGraph with Python bindings and Blender export. See here for a C++ example on mixing Pinocchio and Gepetto Viewer.
  • Meshcat: supporting visualization in Python and which can be embedded inside any browser.
  • Panda3d: supporting visualization in Python and which can be embedded inside any browser.
  • RViz: supporting visualization in Python and which can interact with other ROS packages.
  • Viser: supporting browser-based visualization in Python, with support for widgets such as sliders and interactive markers.

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.

Core-dev team

The currently active core developers of Pinocchio are:

Credits

In addition to the core dev team, the following people have also 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

  • Crocoddyl: A software to realize model predictive control for complex robotics platforms.
  • TSID: A software that implements a Task Space Inverse Dynamics QP.
  • HPP: A SDK that implements motion planners for humanoids and other robots.
  • Jiminy: A simulator based on Pinocchio.
  • ocs2: A toolbox for Optimal Control for Switched Systems (OCS2)
  • TriFingerSimulation: TriFinger Robot Simulation (a Robot to perform RL on manipulation).
  • Casadi_Kin_Dyn: IIT Package for generation of symbolic (SX) expressions of robot kinematics and dynamics.
  • PyRoboPlan: An educational Python library for manipulator motion planning using the Pinocchio Python bindings.
  • ProxSuite-NLP: A primal-dual augmented Lagrangian solver for nonlinear programming on manifolds.
  • Aligator: A versatile and efficient framework for constrained trajectory optimization.
  • Simple: The Simple Simulator: Simulation Made Simple.
  • LoIK: Low-Complexity Inverse Kinematics.

Acknowledgments

The development of Pinocchio is actively supported by 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

libpinocchio-3.8.0.tar.gz (4.0 MB view details)

Uploaded Source

Built Distributions

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

libpinocchio-3.8.0-0-py3-none-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

libpinocchio-3.8.0-0-py3-none-manylinux_2_28_aarch64.whl (4.6 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

libpinocchio-3.8.0-0-py3-none-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

libpinocchio-3.8.0-0-py3-none-macosx_10_9_x86_64.whl (4.7 MB view details)

Uploaded Python 3macOS 10.9+ x86-64

File details

Details for the file libpinocchio-3.8.0.tar.gz.

File metadata

  • Download URL: libpinocchio-3.8.0.tar.gz
  • Upload date:
  • Size: 4.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for libpinocchio-3.8.0.tar.gz
Algorithm Hash digest
SHA256 687442a8316d03cbe1a5c66e20499bf3fadb59439d6207e36118eef34f73d8c8
MD5 f13486f44bda1c2f9338198dbe961a03
BLAKE2b-256 0b9fb4431f1acdce04300d798a87b98b064c1bb56061848abd9476c7b7e9dac2

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpinocchio-3.8.0.tar.gz:

Publisher: release.yml on cmake-wheel/libpinocchio

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

File details

Details for the file libpinocchio-3.8.0-0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for libpinocchio-3.8.0-0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b52ca3520635f551ab2c8c9bf5e8e555b54e92c4bb948020eb4e4dc1b3f9eb0b
MD5 1969d090c10b081f87bc129cef6eccb7
BLAKE2b-256 280d5deebded1fa71a381c9efd3ea69103a38f64d804da704148e92f4886762d

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpinocchio-3.8.0-0-py3-none-manylinux_2_28_x86_64.whl:

Publisher: release.yml on cmake-wheel/libpinocchio

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

File details

Details for the file libpinocchio-3.8.0-0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for libpinocchio-3.8.0-0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b70bc23fb9f53d0a65929c92bac8c0df836bef064225a54d009214cdd778bdb7
MD5 4f1a3c1b91d5e93e6f24e19c5a3ecc31
BLAKE2b-256 faf5950cd3be129766d6f847cb0702f73ad5f6ed2d2b5775e073f9f017d923b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpinocchio-3.8.0-0-py3-none-manylinux_2_28_aarch64.whl:

Publisher: release.yml on cmake-wheel/libpinocchio

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

File details

Details for the file libpinocchio-3.8.0-0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libpinocchio-3.8.0-0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0320c471bd4e78226cc266ad7927432f884709104fa8a253e565adbed7da8aac
MD5 0372d047cf0b7f6b1f896923c96f70b8
BLAKE2b-256 7ba9a4842e056d3f7d07c3f96f90c8f7fe7ef7e543c725f1c9498e5f4d58c47c

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpinocchio-3.8.0-0-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on cmake-wheel/libpinocchio

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

File details

Details for the file libpinocchio-3.8.0-0-py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for libpinocchio-3.8.0-0-py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b8266d37482c35b5aa27240f3a0274447cd038aa219bdd6413c0bafcad822e2b
MD5 94463e14ac29115ebe5d22ef3b8a5d10
BLAKE2b-256 3271b17ca7f4c0cb0f216441222e22c3fb8d905ba038ec5ac7c120790340da95

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpinocchio-3.8.0-0-py3-none-macosx_10_9_x86_64.whl:

Publisher: release.yml on cmake-wheel/libpinocchio

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