MINK-WARP#
mink-warp is batched differential inverse kinematics on MuJoCo Warp, with a Mink-shaped API.
Given a robot’s current configuration and a stack of task-space objectives, mink-warp computes joint velocities (or configuration updates) that reduce weighted task error — for many worlds in parallel on the GPU.
Purpose#
mink-warp exists for real-time, GPU-batched differential IK in MuJoCo Warp
pipelines — not as a replacement for Newton IK [Newton].
It targets the same niche as Mink (composable tasks, velocity output, control
loops), scaled to nworld on device. See Why mink-warp (and not Newton IK)?
for a full comparison with Newton IK and when to use each.
Key features#
Mink-shaped API —
Configuration,FrameTask,RelativeFrameTask,EqualityConstraintTask,solve_ik(), andSE3/SO3helpers.Hard limits —
ConfigurationLimit,VelocityLimit,CollisionAvoidanceLimit,LinearInequalityLimitviaConstrainedSolver.Device-native hot path — FK, Jacobians, residual assembly, and linear solves run as Warp kernels on
wp.arraybuffers; NumPy only at boundaries.Batched by design —
nworldparallel instances share one model and one launch grid (multi-agent IK, parameter sweeps).Interchangeable solvers — damped least squares (default), Levenberg–Marquardt, L-BFGS, and constrained ADMM.
CUDA graph capture — optional one-step
solve_and_integrategraph for fixed task sets (disabled when a task/limit requires host reads).Runnable demos — numbered
examples/01_…through05_…(mjviser); see Examples.
Minimal example#
import mujoco
import mink_warp as mw
model = mujoco.MjModel.from_xml_path("robot.xml")
cfg = mw.Configuration(model, nworld=512, device="cuda")
frame = mw.FrameTask("ee", "site", position_cost=1.0, orientation_cost=1.0)
frame.set_target_from_configuration(cfg)
posture = mw.PostureTask(model, cost=1e-2)
posture.set_target_from_configuration(cfg)
solver = mw.DLSSolver(cfg)
solver.solve_and_integrate([frame, posture], dt=0.01, use_graph=True)
Table of Contents#
Getting Started
Concepts
API Reference
Further Reading
License#
mink-warp is licensed under Apache-2.0. See the LICENSE file.