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 like 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
- Pinocchio main features
- Documentation
- Examples
- Tutorials
- Performances
- Ongoing developments
- Visualization
- Citing Pinocchio
- Questions and Issues
- Credits
- Open-source projects relying on Pinocchio
- Acknowledgments
Pinocchio3 is released for development under the branch pinocchio3-preview on the main github repository. With Pinocchio3, multiple new features are introduced in Pinocchio, such as:
- Sparse Solution of Constrained Dynamics (Published in Robotics: Science and Systems 2021)
- Constrained Dynamics Derivatives (In pre-publishing stages)
- Constraint Models for handling loop constraints.
- Full casadi support in python and C
- Increased support of CppAD and CppADCodeGen
- New SDF parser.
- and much more...
Pinocchio developers are highly encouraged to check out the new features. However, please keep in mind that this remains a development branch, and thus the API between 2.9.x and 2.9.{x 1} could change without backward compatibility.
The new constrained dynamics algorithm can be cited by the following publication:
@inproceedings{carpentier:hal-03271811,
TITLE = {{Proximal and Sparse Resolution of Constrained Dynamic Equations}},
AUTHOR = {Carpentier, Justin and Budhiraja, Rohan and Mansard, Nicolas},
URL = {https://hal.inria.fr/hal-03271811},
BOOKTITLE = {{Robotics: Science and Systems 2021}},
ADDRESS = {Austin / Virtual, United States},
YEAR = {2021},
MONTH = Jul,
PDF = {https://hal.inria.fr/hal-03271811/file/rss-proximal-and-sparse.pdf},
HAL_ID = {hal-03271811},
HAL_VERSION = {v1},
}
Pinocchio is fast:
- C template library,
- cache friendly,
- automatic code generation support is available via CppADCodeGen.
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,
- support multiple precision arithmetic via Boost.Multiprecision or any similar framework,
- computations of kinematic and dynamic regressors for system identification and more,
- and much more with the support of modern and open-source Automatic Differentiation frameworks like CppAD or CasADi.
Pinocchio is flexible:
- header only,
- C 98/03/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).
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.
We provide some basic examples of using Pinocchio in Python in the examples directory. Additional examples introducing Pinocchio are also available in the documentation.
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 is constantly tested for several platforms and distributions, as reported below:
CI on ROS | |
CI on Linux via APT | |
CI on OSX via Conda | |
CI on Windows via Conda | |
CI on Linux via Robotpkg |
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.
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.
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.
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.
If you only need the Python bindings of Pinocchio, you may prefer to install it through Conda. Please follow the procedure described here.
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:
- 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 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 |
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.
Many external viewers can also be integrated. See the example here for more information.
To cite Pinocchio in your academic research, please 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}
}
The algorithms for the analytical derivatives of rigid-body dynamics algorithms are detailed here:
@inproceedings{carpentier2018analytical,
title = {Analytical Derivatives of Rigid Body Dynamics Algorithms},
author = {Carpentier, Justin and Mansard, Nicolas},
booktitle = {Robotics: Science and Systems},
year = {2018}
}
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 [email protected].
The following people have been involved in the development of Pinocchio and are warmly thanked for their contributions:
- Justin Carpentier (Inria): main developer and manager of the project
- Nicolas Mansard (LAAS-CNRS): initial project instructor
- Guilhem Saurel (LAAS-CNRS): continuous integration and deployment
- Joseph Mirabel (Eureka Robotics): Lie groups and hpp-fcl implementation
- Antonio El Khoury (Wandercraft): bug fixes
- Gabriele Buondono (LAAS-CNRS): features extension, bug fixes, and Python bindings
- Florian Valenza (Astek): core developments and hpp-fcl support
- Wolfgang Merkt (University of Oxford): ROS integration and support
- Rohan Budhiraja (LAAS-CNRS): features extension
- Loïc Estève (Inria): Conda integration and support
- Igor Kalevatykh (Inria): Panda3d viewer support
- Matthieu Vigne (Wandercraft): MeshCat viewer support
- Robin Strudel (Inria): features extension
- François Keith (CEA): Windows support
- Sarah El Kazdadi (Inria): multi-precision arithmetic support
- Nicolas Torres Alberto (Inria): features extension
- Etienne Arlaud (Inria): RViz viewer support
- Wilson Jallet (LAAS-CNRS/Inria): extension of Python bindings
- Fabian Schramm (Inria): core developper
- Shubham Singh (UT Austin): second-order inverse dynamics derivatives
- Stéphane Caron (Inria): core developper
- Joris Vaillant (Inria): core developer and manager of the project
- Sebastian Castro (The AI Institute): MeshCat viewer features extension
- Lev Kozlov: Kinetic and potential energy regressors
If you have participated in the development of Pinocchio, please add your name and contribution to this list.
- 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.
The development of Pinocchio is actively supported by the Gepetto team @LAAS-CNRS and the Willow team @INRIA.