mink: Python Inverse Kinematics based on MuJoCo

repository·main·Indexed 23 days ago

https://github.com/kevinzakka/mink

A Python library for differential inverse kinematics (IK) built on the MuJoCo physics engine for robotics research and control. Key features include task specification in configuration or operational space, joint position and velocity limits, collision avoidance between geoms, support for closed-chain kinematics via MuJoCo equality constraints, and a C-optimized Lie group interface for rigid body transformations.

Tokens
10.6K
Snippets
20
Records
71
Agent score
78%

What's inside mink

  1. Overview of mink features

    main

    mink is a Python library for differential inverse kinematics (IK) built on top of the MuJoCo physics engine. Key capabilities include:

    • Task Specification: Define tasks in either configuration or operational space.
    • Constraints: Support for joint position and velocity limits.
    • Collision Avoidance: Avoid collisions between any pair of geoms.
    • Closed-Chain Kinematics: Support for loop closures via MuJoCo equality constraints.
    • Lie Group Interface: Native C-optimized Lie group interface for rigid body transformations, optimized for IK hot paths.
  2. Use the Tidybot and Mobile Kinova MJCF descriptions

    main

    This package provides modular MJCF (MuJoCo XML) descriptions for a mobile manipulator consisting of a Kinova Gen 3 arm mounted on a holonomic base. It is designed to allow for easy swapping of end-effectors, such as replacing the default 2F85 Robotiq gripper with a Leap Hand.

    XML File Variations

    • tidybot.xml: Uses a nested class naming convention.
    • mobile_kinova.xml: Uses a flattened naming convention for better compatibility (recommended for most use cases).

    Usage Examples

    • Robotiq Gripper: To load the robot with the default 2F85 Robotiq gripper, use tidybot.xml as shown in mobile_tidybot.py.
    • Custom End-Effectors: To load the mobile Kinova robot with different hands (e.g., Leap Hand), use mobile_kinova.xml as shown in mobile_kinova.py or mobile_kinova_leap.py.
  3. Use the Allegro Hand V3 MJCF description

    main

    This package provides simplified MuJoCo (MJCF) descriptions for the Wonik Allegro Hand v3, supporting both right-handed and left-handed configurations. These models are derived from publicly available URDF descriptions and are optimized for use in MuJoCo simulations.

    Requirements:

    • MuJoCo 2.2.2 or later.
  4. Use the Lie module for rigid-body transforms

    main
    The mink.lie module provides a Lie group interface for handling rigid-body transforms. It is designed to be compatible with MuJoCo by delegating to MuJoCo's quaternion and rotation-matrix routines (e.g., using mujoco.mju_mat2Quat for conversions). The implementation is a NumPy-based port of jaxlie, making it suitable for standard scientific computing workflows without requiring JAX.
  5. Use the Unitree G1 MJCF description in MuJoCo

    main

    This package provides a simplified MuJoCo XML (MJCF) description of the Unitree G1 Humanoid Robot. It is a derivation of the official Unitree ROS description, optimized for MuJoCo by extracting common properties into <default> sections and adding essential sensors and visual elements.

    Requirements:

    • MuJoCo version 2.3.4 or later.
  6. Use the Boston Dynamics Spot MJCF description

    main

    This package provides a simplified MuJoCo (MJCF) robot description for the Boston Dynamics Spot Quadruped. It is a derivation of the publicly available MJCF description from the spot_ros2 repository, optimized for use in MuJoCo simulations.

    Requirements:

    • MuJoCo 3.1.3 or later is required to run this model correctly.
  7. Use the Unitree Go1 MJCF description in MuJoCo

    main

    This package provides a simplified MJCF (MuJoCo XML) description of the Unitree Go1 Quadruped Robot. It is derived from the official Unitree ROS URDF description but optimized for MuJoCo simulation.

    Requirements:

    • MuJoCo version 2.2.2 or later.

    Key Simulation Features:

    • Optimized Contacts: Foot contacts are softened to approximate rubber material, and the impratio has been increased to reduce slippage during simulation.
    • Custom Collision Geometry: Collision geometries have been manually designed for better simulation stability.
    • Scene Setup: Includes a scene.xml file that provides a complete simulation environment containing the robot, a textured groundplane, a skybox, and haze.