pin
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
What it is and what it does
pin is a Python binding to a high-performance C++ library for rigid-body dynamics computations. It implements algorithms for forward and inverse kinematics, forward and inverse dynamics, centroidal dynamics, and contact dynamics, all with analytical derivatives suitable for gradient-based optimization. The library is built on Eigen for linear algebra and coal for collision detection, and supports multiple robot description formats (URDF, SDF, MJCF, SRDF) as well as programmatic model construction.
Designed primarily for robotics, pin handles closed-loop kinematic mechanisms, frictional contact problems, and sparse constrained dynamics. The C++ template design allows compile-time specialization and custom scalar types, while the Python interface enables rapid prototyping. The library is actively maintained and extensively tested across Windows, macOS, and Linux platforms.
Use it for:
- Computing forward and inverse kinematics and dynamics for robot control and trajectory optimization.
- Gradient-based robot motion planning and learning using analytical derivatives of dynamics algorithms.
- Simulating closed-loop mechanisms and frictional contact in physics-based applications.
- Identifying system parameters via kinematic and dynamic regressors for system identification.
- Prototyping hierarchical control frameworks and differential dynamic programming solvers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python interface to a C++ rigid-body dynamics library that computes forward and inverse kinematics, dynamics, and their analytical derivatives for articulated mechanical systems.
Yes, with conditions. Install if you need production-grade rigid-body dynamics and can work with the compiled dependency stack. The library is actively maintained, permissively licensed (BSD-3-Clause), and widely deployed. On macOS and Windows, prefer Conda installation over pip; on Linux, pip is available but requires underlying C++ libraries. No known security vulnerabilities.
Install
pin on PyPI
pip
pip install pinuv
uv add pinpoetry
poetry add pinInstalling pin
Before you install
Medium install friction due to compiled dependencies (cmeel, cmeel-boost, cmeel-urdfdom, coal, libpinocchio). Actively maintained with recent releases; supports Python 3.9+ across macOS (Intel and ARM) and Linux platforms via pre-built wheels.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; you must retain copyright and license notices in derivative works.
Quickstart
pip install pin
import pin
model = pin.buildModelFromUrdf('robot.urdf')
data = model.createData()
pin.forwardKinematics(model, data, q)
Requires compiled C++ library stack (libpinocchio and dependencies); pip installation currently available only on Linux—macOS and Windows users should use Conda instead.
Verify before relying
- Whether analytical derivatives support automatic differentiation frameworks beyond those mentioned in the description.
- Performance characteristics and scalability limits for large kinematic trees or real-time control loops.
- Maturity and completeness of MJCF and SDF format support relative to URDF.
- Whether the package is suitable for biomechanics, computer graphics, or vision applications as suggested in the description.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 5 — cmeel, cmeel-boost, cmeel-urdfdom, coal, libpinocchio |
| Maintenance | actively maintained — 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,105,874/month — #4,365 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pin-4.1.0-0-cp310-cp310-macosx_10_9_x86_64.whl; pin-4.1.0-0-cp310-cp310-macosx_11_0_arm64.whl; pin-4.1.0-0-cp310-cp310-manylinux_2_28_aarch64.whl; pin-4.1.0-0-cp310-cp310-manylinux_2_28_x86_64.whl; pin-4.1.0-0-cp311-cp311-macosx_10_9_x86_64.whl; pin-4.1.0-0-cp311-cp311-macosx_11_0_arm64.whl; pin-4.1.0-0-cp311-cp311-manylinux_2_28_aarch64.whl; pin-4.1.0-0-cp311-cp311-manylinux_2_28_x86_64.whl; pin-4.1.0-0-cp312-cp312-macosx_10_9_x86_64.whl; pin-4.1.0-0-cp312-cp312-macosx_11_0_arm64.whl; pin-4.1.0-0-cp312-cp312-manylinux_2_28_aarch64.whl; pin-4.1.0-0-cp312-cp312-manylinux_2_28_x86_64.whl; pin-4.1.0-0-cp313-cp313-macosx_10_9_x86_64.whl; pin-4.1.0-0-cp313-cp313-macosx_11_0_arm64.whl; pin-4.1.0-0-cp313-cp313-manylinux_2_28_aarch64.whl; pin-4.1.0-0-cp313-cp313-manylinux_2_28_x86_64.whl; pin-4.1.0-0-cp314-cp314-macosx_10_9_x86_64.whl; pin-4.1.0-0-cp314-cp314-macosx_11_0_arm64.whl; pin-4.1.0-0-cp314-cp314-manylinux_2_28_aarch64.whl; pin-4.1.0-0-cp314-cp314-manylinux_2_28_x86_64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
dynamixel-sdkProvides Python bindings for ROBOTIS Dynamixel…
permissive · top 15,000 on PyPI
libpinocchiolibpinocchio provides efficient rigid body…
permissive · top 15,000 on PyPI
pin-pinkPink solves differential inverse kinematics for…
permissive · top 15,000 on PyPI
pybulletPyBullet provides physics simulation, robotics…
permissive · top 15,000 on PyPI
drakeDrake is a robotics toolbox for analyzing robot…
permissive · top 15,000 on PyPI
mplibMPlib provides motion planning algorithms for…
permissive · top 15,000 on PyPI
minkmink solves inverse kinematics problems for…
permissive · top 15,000 on PyPI
coal-libraryCoal provides collision detection, distance…
permissive · top 15,000 on PyPI
newtonNewton is a GPU-accelerated physics simulation…
permissive · top 15,000 on PyPI
pymunkPymunk is a 2D rigid body physics simulation…
permissive · top 15,000 on PyPI