Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:ARISE Initiative Robosuite MinkController

From Leeroopedia
Revision as of 12:00, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/ARISE_Initiative_Robosuite_MinkController.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Robotics, Inverse Kinematics, Motion Control
Last Updated 2026-02-15 07:00 GMT

Overview

The MinkController module implements a whole-body inverse kinematics (IK) controller using the mink library, enabling task-space control of robotic manipulators including bimanual and humanoid robots.

Description

This module provides two main classes. IKSolverMink is a general-purpose IK solver that uses the mink library's quadratic programming approach to solve inverse kinematics for one or more end-effector sites. It supports multiple input types (absolute poses, delta positions, delta poses), multiple reference frames (world, base, end-effector), and multiple rotation representations (quaternion wxyz, axis-angle). The solver maintains a separate mink Configuration for the robot model and synchronizes it with the full simulation state.

WholeBodyMinkIK is a composite controller that registers itself with robosuite's controller system under the name "WHOLE_BODY_MINK_IK". It extends the WholeBody base class and uses IKSolverMink as its joint action policy. It validates controller configurations including actuation part names, reference site names, and IK posture weights against the actual robot model.

The module also includes WeightedPostureTask, a custom mink posture task that applies per-joint weights to the posture error and Jacobian, allowing certain joints to be penalized more heavily for deviating from their target posture. Additionally, the module monkey-patches the mink Configuration.update method to support partial joint updates via update_idxs, and adds compute_translation_error and compute_orientation_error methods to FrameTask for debugging.

Usage

Use this module when you need task-space (Cartesian) control of robotic manipulators through inverse kinematics. It is particularly suited for bimanual robots and humanoids where whole-body coordination is required. The controller is registered as "WHOLE_BODY_MINK_IK" in the robosuite composite controller system.

Code Reference

Source Location

Signature

class IKSolverMink:
    def __init__(
        self,
        model: mujoco.MjModel,
        data: mujoco.MjData,
        site_names: List[str],
        robot_model: mujoco.MjModel,
        robot_joint_names: Optional[List[str]] = None,
        verbose: bool = False,
        input_type: Literal["absolute", "delta", "delta_pose"] = "absolute",
        input_ref_frame: Literal["world", "base", "eef"] = "world",
        input_rotation_repr: Literal["quat_wxyz", "axis_angle"] = "axis_angle",
        posture_weights: Dict[str, float] = None,
        solve_freq: float = 20.0,
        hand_pos_cost: float = 1,
        hand_ori_cost: float = 0.5,
        com_cost: float = 0.0,
        use_mink_posture_task: bool = False,
        initial_qpos_as_posture_target: bool = False,
    )

@register_composite_controller
class WholeBodyMinkIK(WholeBody):
    name = "WHOLE_BODY_MINK_IK"

    def __init__(self, sim: MjSim, robot_model: RobotModel,
                 grippers: Dict[str, GripperModel])

class WeightedPostureTask(mink.PostureTask):
    def __init__(self, model: mujoco.MjModel, cost: float,
                 weights: np.ndarray, lm_damping: float = 0.0,
                 gain: float = 1.0)

Import

from robosuite.examples.third_party_controller.mink_controller import (
    IKSolverMink,
    WholeBodyMinkIK,
    WeightedPostureTask,
)

I/O Contract

Inputs

Name Type Required Description
model mujoco.MjModel Yes Full simulation MuJoCo model
data mujoco.MjData Yes Full simulation MuJoCo data
site_names List[str] Yes Names of MuJoCo sites to use as IK targets (end-effectors)
robot_model mujoco.MjModel Yes Standalone robot MuJoCo model for IK computation
robot_joint_names Optional[List[str]] No Joint names to control; defaults to all non-fixed joints
input_type Literal["absolute", "delta", "delta_pose"] No Type of input action (default: "absolute")
input_ref_frame Literal["world", "base", "eef"] No Reference frame for input actions (default: "world")
input_rotation_repr Literal["quat_wxyz", "axis_angle"] No Rotation representation format (default: "axis_angle")
posture_weights Dict[str, float] No Per-joint weights for the posture task
solve_freq float No IK solve frequency in Hz (default: 20.0)
hand_pos_cost float No Position cost weight for hand tasks (default: 1.0)
hand_ori_cost float No Orientation cost weight for hand tasks (default: 0.5)

Outputs

Name Type Description
joint_positions np.ndarray Solved joint positions for the controlled joints (from IKSolverMink.solve())
control_dim int Total dimensionality of the control input
control_limits tuple Tuple of (lower, upper) action limit arrays

Usage Examples

import mujoco
import numpy as np
from robosuite.examples.third_party_controller.mink_controller import IKSolverMink

# Create an IK solver for a bimanual robot
solver = IKSolverMink(
    model=full_model,
    data=full_data,
    site_names=["right_eef_site", "left_eef_site"],
    robot_model=robot_mj_model,
    input_type="delta",
    input_ref_frame="base",
    input_rotation_repr="axis_angle",
    solve_freq=20.0,
)

# Solve for joint positions given a delta action
# Action format: [right_pos(3), right_axisangle(3), left_pos(3), left_axisangle(3)]
action = np.zeros(12)
action[0] = 0.01  # move right hand +x by 1cm
joint_positions = solver.solve(action)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment