kevinzakka/mink
Python inverse kinematics based on MuJoCo.
mink is a Python library for solving inverse kinematics (IK) on robots, built on the MuJoCo physics engine. It lets you specify what you want the robot to do as tasks (e.g., move a hand to a target pose), limits (e.g., joint ranges), and constraints (e.g., keep a foot flat on the floor). At each step, mink solves a quadratic program to find a joint velocity that best reduces task errors while respecting all limits and constraints. Integrating that velocity over a short time step moves the robot toward the goal. It works with any MuJoCo model, from a single arm to a humanoid with a floating base.
How it works in practice:
- You create a
Configurationfrom a MuJoCo model. - Define tasks like
FrameTask(target pose for a body),PostureTask(keep near a reference), etc. - Call
solve_ikto get a velocity, thenintegrate_inplaceto update the configuration. Repeat in a loop. - Tasks can also be used as hard constraints (must hold exactly) or as
Elasticconstraints (yield via an L1 penalty if infeasible).
Key features:
- Tasks: frame poses (world or relative), center of mass, posture, look-at, axis alignment, closed kinematic chains (from MuJoCo equality constraints), damping, DOF freezing.
- Limits: joint position/velocity limits, floating-base velocity limits, collision avoidance between geoms.
- Constraints: hard equality constraints or elastic (soft) versions.
- Native C code for frame transforms and Jacobians for speed.
Installation: uv add mink
Examples: The README links to many runnable examples covering different robots (Panda, UR5e, Spot, humanoids, etc.) and scenarios (elastic constraints, look-at, closed chains, DOF freezing, actuators, dual arms).
Credits: mink is a direct port of the Pink library (built on Pinocchio), with code adapted from jaxlie and dm_robotics. It is licensed under Apache-2.0.
Related
- Project
- Project
- Project
- Project
- Project