• Stars
    star
    1,661
  • Rank 28,132 (Top 0.6 %)
  • Language
    C++
  • License
    BSD 2-Clause "Sim...
  • Created about 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

Pinocchio Logo

License Documentation Coverage Report Conda Downloads Conda Version PyPI version

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 is first tailored for robotics applications, but it can be used in extra 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, an open-source software for Motion and Manipulation Planning.

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

If you want to directly dive into Pinocchio, 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,
  • automatic code generation support 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 of 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).

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

We provide some basic examples on how to use Pinocchio in Python in the examples directory. 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 developped 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 OSX via Conda mac
CI on Windows via Conda windows
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 is able to 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.

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 done here may also help you to understand and compare the performances of the modern rigid body dynamics librairies.

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.

If you only need the Python bindings of Pinocchio, you may prefer to install it through Conda. Please follow the procedure described here.

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 depend on Pinocchio in your package.xml config (<depend>pinocchio</depend>) and include it via CMake (find_package(pinocchio REQUIRED)) -- we include support and hooks to discover the package for both ROS1 and ROS2. An example can be found here. Please note that we advise to always include the pinocchio/fwd.hpp header as the first include to avoid compilation errors from differing Boost-variant sizes.

ROS1      ROS2
Melodic      Foxy
Noetic      Galactic
     Humble
     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.

Many external viewers can also be integrated. See example here for more information.

Citing Pinocchio

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

Questions and Issues

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].

Credits

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

If you have taken part to the development of Pinocchio, feel free to add your name and contribution in this list.

Open-source projects relying on Pinocchio

  • Crocoddyl A software to realize model predictive control for complex robotics platform.
  • TSID A software which implements an Task Space Inverse Dynamics QP.
  • HPP A SDK which implements motion planner 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.

Acknowledgments

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

More Repositories

1

tsid

Efficient Task Space Inverse Dynamics (TSID) based on Pinocchio
C++
187
star
2

eigenpy

Efficient bindings between Numpy and Eigen using Boost.Python
C++
163
star
3

eiquadprog

C++ reimplementation of eiquadprog
C++
27
star
4

dynamic-graph

Efficient data-flow library for robotics.
C++
25
star
5

soth

SOT Hierarchical solver
C++
19
star
6

sot-core

Hierarchical task solver plug-in for dynamic-graph
C++
18
star
7

pinocchio-minimal

Minimal project using Pinocchio as Rigid Body Dynamics library
C++
15
star
8

pinocchio-gepetto-viewer

C++
12
star
9

parametric-curves

Library for creating curves. Forked from https://github.com/stonneau/spline
C++
11
star
10

sot-torque-control

Collection of dynamic-graph entities aimed at implementing torque control on different robots.
C++
9
star
11

dynamic-graph-python

Python bindings for dynamic-graph
C++
8
star
12

state-observation

Describes interfaces for state observers, and implements some oberservers (including linear and extended Kalman filters)
C++
5
star
13

sot-dynamic-pinocchio

Encapsulate Pinocchio in SoT
C++
5
star
14

dynamic-graph-tutorial

Tutorial for the dynamic-graph
C++
5
star
15

pinocchio-tutorials

DEPRECATED Tutorials for Pinocchio stack-of-tasks/pinocchio
Python
5
star
16

sot-pattern-generator

jrl-walkgen bindings for dynamic-graph
C++
4
star
17

ros2_hardware_interface_odri

ros2_control System Interface for the Open Dynamic Robot Initiative Master Board
C++
4
star
18

sot-dynamic

jrl-dynamics bindings for dynamic-graph
C++
4
star
19

eigenpy-ros-release

Release repository for https://github.com/stack-of-tasks/eigenpy.git
3
star
20

roscontrol_sot

Wrapping the Stack-of-Stacks in roscontrol
C++
3
star
21

talos-torque-control

Specific torque control part of sot-torque-control for Talos
Python
3
star
22

jrl-doc

Meta-documentation package for the JRL software.
3
star
23

pinocchio-benchmarks

Benchmarks of the Pinocchio library
C++
3
star
24

talos_integration_tests

A repository to perform integration tests
Python
2
star
25

sot-hrp2-hrpsys

C++
2
star
26

redundant_manipulator_control

ROS bindings for the Stack of Tasks
Shell
2
star
27

ddp-actuator-solver

Differential Dynamic Programming Solver
C++
2
star
28

sot-hrp2

C++
2
star
29

dynamic_graph_bridge

Dynamic graph bindings for ROS
C++
2
star
30

sot-motion-planner

C++
2
star
31

stack-of-tasks.github.com

Website
HTML
2
star
32

dynamic-graph-corba

Corba server implementing an entity with python interpreter embedded.
C++
1
star
33

sot-dyninv

Python
1
star
34

dynamic_graph_actionlib

Python
1
star
35

redundant_manipulator_control_tutorial

Tutorial for the redundant_manipulator_control_tutorial ROS stack.
Python
1
star
36

sot_pr2

dynamic-graph controller for PR2 robot
C++
1
star
37

sot-hrprtc-hrp2

RTC component for the Stack of Tasks
C++
1
star
38

talos-metapkg-ros-control-sot

Metapkg to run the Stack-of-Tasks on TALOS with ros control
Python
1
star
39

sot-doc

Doxygen based documentation for the stack-of-tasks organization
Shell
1
star