Registry / ai-ml / pin
library4.1.0pypypi✓ verified 21d ago

Pinocchio is a C++ library with Python bindings for efficient computation of Rigid Body Dynamics (RBD) algorithms and their analytical derivatives. Primarily used in robotics, biomechanics, and computer graphics, it provides state-of-the-art algorithmic solutions for poly-articulated systems, including closed-loop mechanisms and frictional contact problems. It is actively developed by Inria and is currently at version 3.9.0.

pip install pin
INSTALL
IMPORT
SIG · PIN
P
pin
ai-mlpythonv4.1.0
Install
9.6s avg
Import
Disk
468MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 10.6s
py 3.11
✕ build_error
✓ 9.3s
py 3.12
✕ build_error
✓ 8.9s
py 3.13
✕ build_error
✓ 9.5s
py 3.9
✕ build_error
✕ build_error
468MB installed
● package 468MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pinocchio
import pinocchio as pin
import pinocchio as se3
The 'se3' alias was common in Pinocchio 2.x but is deprecated in 3.x; 'pin' is now the recommended alias.

This quickstart code initializes a Pinocchio model (a simple 6-DOF manipulator), generates a random joint configuration, computes the forward kinematics, and then prints the position of the end-effector frame. This demonstrates basic model loading and kinematics computation.

import pinocchio as pin import numpy as np # Create a default model (e.g., a simple 6-DOF manipulator) model = pin.buildSampleModel() # Create a data structure for algorithm buffering data = model.createData() # Generate a random configuration q = pin.randomConfiguration(model) # Compute forward kinematics pin.forwardKinematics(model, data, q) pin.updateFramePlacements(model, data) # Print the position of the end-effector frame (last frame in the model) # (Note: model.frames is a list of all frames, data.oMf[frame.id] is its placement) end_effector_frame_id = model.frames[-1].body end_effector_position = data.oMf[end_effector_frame_id].translation print(f"Model name: {model.name}") print(f"Random configuration (q): {q.T}") print(f"End-effector position: {end_effector_position.T}")
Debug
Known issues
breakingThe top-level C++ namespace `se3` has been changed to `pinocchio` in Pinocchio 3.x. The Python import idiom `import pinocchio as se3` is now deprecated.
fix
Update C++ code to use `pinocchio::` namespace. In Python, use `import pinocchio as pin`.
affects: 3.0.0 and later
breakingThe collision detection library dependency transitioned from `FCL` to `Coal`. Related headers (e.g., `pinocchio/multibody/fcl.hpp`) and macros (e.g., `PINOCCHIO_WITH_HPP_FCL`) have been deprecated or removed.
fix
Migrate collision-related code to use `Coal` equivalents. Check `pinocchio/multibody/coal.hpp` and associated APIs.
affects: 3.x series
breakingPinocchio 3.x requires minimum versions of its C++ dependencies: Eigen 3.4+ and Boost 1.74+. Building from source with older versions of these libraries will fail.
fix
Ensure that your system or build environment meets the minimum required versions for Eigen and Boost.
affects: 3.x series
gotchaThe official Python package for Pinocchio is distributed on PyPI under the name `pin`, not `pinocchio`. There is an unrelated, older package also named `pinocchio` on PyPI which can cause confusion and incorrect installations.
fix
Always use `pip install pin` for the Pinocchio rigid-body dynamics library.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pinocchio'
The Python package for the Pinocchio rigid-body dynamics library is named `pin` on PyPI, not `pinocchio`. Alternatively, if installed from source or a package manager other than pip/conda, necessary environment variables like `PYTHONPATH` or `LD_LIBRARY_PATH` might be missing or incorrect.
fix
Install using `pip install pin`. If installed from other sources, verify and set `PYTHONPATH` and `LD_LIBRARY_PATH` to include the Pinocchio Python bindings and shared libraries, respectively.
ImportError: libpinocchio.so.X.Y.Z: cannot open shared object file: No such file or directory
This typically occurs on Linux when the dynamic linker cannot find the Pinocchio shared libraries. This often happens with installations from source or specific package managers (like robotpkg) where `LD_LIBRARY_PATH` is not correctly configured.
fix
Set the `LD_LIBRARY_PATH` environment variable to include the directory containing `libpinocchio.so`. For example: `export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH` (adjust path as per your installation).
RuntimeError: The number of elements does not fit with the vector type.
This error often arises when attempting to assign a NumPy array to a Pinocchio internal vector/matrix type, and the dimensions or element count of the NumPy array do not precisely match the expected size of the Pinocchio object. This can occur with scalars, requiring them to be wrapped in a specific-sized array.
fix
Ensure that NumPy arrays passed to Pinocchio functions or assigned to Pinocchio data structures have the exact dimensions and types expected. For scalar inputs, sometimes explicitly creating a NumPy array of size 1 (e.g., `np.array([value])`) can resolve the issue.
Upgrade
Version history
4.1.0latest on PyPI · released Jul 8, 2026
Audit
Dependencies
eigenpyrequiredPython bindings rely on Eigen for linear algebra, exposed via eigenpy.
boostrequiredUnderlying C++ library uses Boost.
example-robot-dataoptionalProvides common robot URDF models for examples and prototyping.
meshcatoptionalA common browser-based visualizer for Pinocchio.
Agent activity
10 hits · last 30 days
node
8
Resources
pin — pip install pin · libregistry