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 ManipulatorModel

From Leeroopedia
Knowledge Sources
Domains Robotics, Simulation, MJCF_Modeling
Last Updated 2026-02-15 07:00 GMT

Overview

ManipulatorModel is the base class for all robot manipulator models (robot arms with grippers), extending RobotModel with gripper mounting, end-effector management, and categorized joint/actuator tracking for arm, base, torso, head, and leg subsystems.

Description

The ManipulatorModel class extends RobotModel to support robot arms that can have grippers attached. On initialization, it computes the hand rotation offset for each arm by reading the quaternion from the end-effector body element in the XML tree, converting it from (w,x,y,z) to (x,y,z,w) format. It supports both single-arm and bimanual configurations through the arm_type property, which determines whether the robot has one ("right") or two ("right", "left") arms.

The class maintains an OrderedDict of grippers keyed by arm name. The add_gripper() method merges a GripperModel into the robot's XML tree at the specified end-effector body. If no arm name is provided, the gripper is added to all end-effectors. The models property returns all sub-models including grippers and the base model.

Joint and actuator tracking is categorized into five subsystems: arm, base (mobile), torso, head, and legs. The update_joints() and update_actuators() methods classify joints and actuators by checking for keywords in their names ("torso", "mobile", "head", "leg"), with anything unmatched assigned to the arms category. This classification enables independent control of each subsystem.

Subclasses must implement abstract properties including arm_type (single or bimanual), default_gripper, base_xpos_offset (position offsets for different arena types), default_base, default_controller_config, and init_qpos. Optional properties gripper_mount_pos_offset and gripper_mount_quat_offset allow customizing gripper attachment positioning.

Usage

Use ManipulatorModel as the base class for any robot model that has one or more arms with gripper mount points. All concrete robot arm implementations in robosuite (e.g., Panda, Sawyer, UR5e, IIWA, Jaco, Kinova3) inherit from this class.

Code Reference

Source Location

Signature

class ManipulatorModel(RobotModel):
    def __init__(self, fname: str, idn=0)

Import

from robosuite.models.robots.manipulators.manipulator_model import ManipulatorModel

I/O Contract

Inputs

Name Type Required Description
fname str Yes Path to the robot's MJCF XML file
idn int or str No Unique identification number or string for this robot instance. Default: 0

Outputs

Name Type Description
eef_name dict of str Prefix-adjusted end-effector body names, keyed by arm ("right" and optionally "left")
grippers OrderedDict Dictionary mapping arm names to mounted GripperModel instances
hand_rotation_offset dict of np.array Quaternion offsets (x,y,z,w) for each arm's end-effector
cameras list of str Camera names found in this robot's worldbody
models list All sub-models (base + grippers)
arm_actuators list of str Actuator names for the arm subsystem
base_actuators list of str Actuator names for the mobile base subsystem
torso_actuators list of str Actuator names for the torso subsystem
head_actuators list of str Actuator names for the head subsystem
legs_actuators list of str Actuator names for the legs subsystem
arm_joints list of str Joint names for the arm subsystem
base_joints list of str Joint names for the mobile base subsystem
torso_joints list of str Joint names for the torso subsystem
head_joints list of str Joint names for the head subsystem
legs_joints list of str Joint names for the legs subsystem

Usage Examples

from robosuite.models.robots import Panda
from robosuite.models.grippers import PandaGripper

# Create a Panda robot (which extends ManipulatorModel)
robot = Panda(idn=0)

# Add a gripper
gripper = PandaGripper()
robot.add_gripper(gripper, arm_name=robot.eef_name["right"])

# Access arm properties
print("Arm type:", robot.arm_type)
print("EEF name:", robot.eef_name)
print("DOF:", robot.dof)
print("Cameras:", robot.cameras)

# Update joint and actuator categorizations
robot.update_joints()
robot.update_actuators()

# Access categorized joints/actuators
print("Arm joints:", robot.arm_joints)
print("Base joints:", robot.base_joints)

# Get the default gripper and controller config
print("Default gripper:", robot.default_gripper)
print("Default controller config:", robot.default_controller_config)
print("Init qpos:", robot.init_qpos)

Related Pages

Page Connections

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