Skip to content
Projects

kevinzakka/mink has 1,603 GitHub stars and 127 forks. GitHot measured +9 in 7 days. Last checked 2026-11-10 02:18 UTC. Last push 2026-11-02.

How these counts are measured

Python inverse kinematics based on MuJoCo.

What you can do

  • Pose of a frame, in the world or relative to a different frame (FrameTask, RelativeFrameTask)
  • Center of mass (ComTask) and joint posture (PostureTask)
  • Direction of a frame axis, toward a point or along a vector (LookAtTask, AxisAlignTask)
  • Closed kinematic chains, from MuJoCo equality constraints (EqualityConstraintTask)

Measured star growth

in 24h
Update delayed
in 7 days
+9
in 15 days
Update delayed
in 1 month
Update delayed

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

mink

Build Coverage Status PyPI version PyPI downloads

mink is a Python library for differential inverse kinematics, built on MuJoCo.

You give mink tasks (objectives, such as a target pose for a frame), limits (inequalities, such as a joint range), and constraints (equalities that must hold, such as a foot that stays flat on the floor). At each step, mink solves a quadratic program for a velocity: the one that best reduces the task errors while it satisfies every limit and constraint. Integrate it over a short time step to get the next configuration, and repeat to move the robot toward the goal. mink works with any MuJoCo model, from a single arm to a humanoid with a floating base.

Unitree H2 + Sharpa: whole body and fingers ALOHA 2: pouring with a relative task Spot: pick from the ground TidyBot: base task and arm task Franka Panda: axis alignment UR5e: collision avoidance (red: without it)

Each image links to a related example.

Installation

uv add mink

Quickstart

This example moves the Panda hand 20 cm forward (+x) and 20 cm down. A posture task keeps the arm near its home configuration.

import mujoco
import numpy as np
import mink
from robot_descriptions import panda_mj_description

model = mujoco.MjModel.from_xml_path(panda_mj_description.MJCF_PATH)
configuration = mink.Configuration(model)
configuration.update_from_keyframe("home")

hand = mink.FrameTask("hand", "body", position_cost=1.0, orientation_cost=1.0)
start = configuration.get_transform_frame_to_world("hand", "body")
hand.set_target(mink.SE3.from_translation(np.array([0.2, 0.0, -0.2])) @ start)

posture = mink.PostureTask(model, cost=1e-2)
posture.set_target_from_configuration(configuration)

dt = 0.01
for _ in range(200):
    vel = mink.solve_ik(configuration, [hand, posture], dt, "daqp")
    configuration.integrate_inplace(vel, dt)

Each loop iteration is one step: solve_ik returns a velocity, and integrate_inplace integrates it over dt to update the configuration.

You can also pass a task as a constraint. A hard constraint must hold exactly. If the problem has no feasible solution, solve_ik raises NoSolutionFound. An Elastic constraint replaces the equality with an L1 penalty. It holds exactly while the penalty is large enough and otherwise yields, so the problem stays feasible.

vel = mink.solve_ik(
    configuration, [posture], dt, "daqp",
    constraints=[mink.Elastic(hand, penalty=1e3)],
)

The documentation explains tasks, limits, and the underlying formulation.

Features

Tasks. mink minimizes the task errors in a weighted least-squares sense.

  • Pose of a frame, in the world or relative to a different frame (FrameTask, RelativeFrameTask)
  • Center of mass (ComTask) and joint posture (PostureTask)
  • Direction of a frame axis, toward a point or along a vector (LookAtTask, AxisAlignTask)
  • Closed kinematic chains, from MuJoCo equality constraints (EqualityConstraintTask)
  • Regularization and DOF freezing (DampingTask, KineticEnergyRegularizationTask, DofFreezingTask)

Limits. mink applies limits as inequalities.

  • Joint position and velocity limits (ConfigurationLimit, VelocityLimit)
  • Velocity limits on a floating base (FreeJointVelocityLimit)
  • Collision avoidance between pairs of geoms (CollisionAvoidanceLimit)

Constraints. mink applies constraints as equalities.

  • A task held exactly (hard constraint)
  • A task wrapped in Elastic, which yields through an L1 penalty instead of making the problem infeasible

Frame transforms and the errors and Jacobians of frame tasks use native C code.

Examples

To run an example:

git clone https://github.com/kevinzakka/mink.git && cd mink
uv sync

uv run examples/arm_ur5e.py           # Linux
./fix_mjpython_macos.sh               # macOS, once
uv run mjpython examples/arm_ur5e.py  # macOS

More examples:

Citation

If you use mink in your research, cite it as follows:

@software{Zakka_Mink_Python_inverse_2026,
  author = {Zakka, Kevin},
  title = {{Mink: Python inverse kinematics based on MuJoCo}},
  year = {2026},
  month = oct,
  version = {1.4.0},
  url = {https://github.com/kevinzakka/mink},
  license = {Apache-2.0}
}

Contributing

Report bugs in the issue tracker. To submit a pull request, read the contributing guidelines.

Acknowledgements

mink is a direct port of Pink, which is built on Pinocchio. Stéphane Caron, the author of Pink, is a role model for open-source software in robotics. This library would not have been possible without his work and assistance throughout this project.

mink also adapts code from these libraries:

  • The Lie group code for the transforms comes from jaxlie.
  • The collision avoidance limit comes from the LSQP controller in dm_robotics.

References

The Lie group code refers to numbered equations in A micro Lie theory for state estimation in robotics, Joan Solà, Jérémie Deray, and Dinesh Atchuthan, arXiv:1812.01537 (2018).

Explore related projects