--- id: pin version: "4.1.0" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # pin — A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives License: permissive · Maintenance: active · Downloads: 1.1M/mo ## 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 above — 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 pip install pin uv add pin poetry add pin ## Installing 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_current - Install friction: medium - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rigid body dynamics, robot kinematics and dynamics, forward inverse dynamics, articulated body algorithms, robotics physics simulation, analytical derivatives dynamics, multi-body system simulation, robotics, physics-simulation, dynamics-algorithms [View on SkillFed](https://skillfed.io/packages/pin) · [View on PyPI](https://pypi.org/project/pin/)