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 LeggedManipulatorModel

From Leeroopedia
Knowledge Sources
Domains Robotics, Robot Modeling, Legged Robots
Last Updated 2026-02-15 07:00 GMT

Overview

The LeggedManipulatorModel class extends the manipulator model with methods for removing joint actuation and free joints, enabling the creation of humanoid robot variants with different levels of body part actuation.

Description

LeggedManipulatorModel inherits from ManipulatorModel and adds two key methods for modifying the robot's MJCF model at construction time. The _remove_joint_actuation method strips all joints and actuators (motors and position controllers) matching a given body part name from the model. It removes the joints from the worldbody, removes corresponding motor and position actuators, removes related tendons, removes joint equality constraints, and removes joint position/velocity/actuator force sensors. This enables creating robot variants where certain body parts (e.g., legs, head, torso) are frozen in their initial configuration.

The _remove_free_joint method removes all free joints from the worldbody, converting the robot from a free-floating body to one that is fixed in space. This is used in conjunction with _remove_joint_actuation to create variants like GR1FixedLowerBody where the humanoid's upper body is fixed in place.

The class also exposes a legs_joints property that returns the list of leg joint names, accessed from the internal _legs_joints attribute.

Usage

Use this class as the base for legged humanoid robot models. Subclasses can call _remove_joint_actuation("leg") and _remove_free_joint() in their constructors to create fixed-body or arms-only variants of a full humanoid model.

Code Reference

Source Location

Signature

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

    def _remove_joint_actuation(self, part_name: str) -> None

    def _remove_free_joint(self) -> None

Import

from robosuite.models.robots.manipulators.legged_manipulator_model import LeggedManipulatorModel

I/O Contract

Inputs

Name Type Required Description
fname str Yes Path to the MJCF XML file for this robot
idn int or str No Unique identification number or string (default: 0)
part_name str Yes (_remove_joint_actuation) Body part keyword to match for removal (e.g., "leg", "head", "torso")

Outputs

Name Type Description
legs_joints list List of leg joint names for this robot

Usage Examples

from robosuite.models.robots.manipulators.legged_manipulator_model import LeggedManipulatorModel

# Typically used as a base class for humanoid robots
class MyHumanoid(LeggedManipulatorModel):
    arms = ["right", "left"]

    def __init__(self, idn=0):
        super().__init__("path/to/humanoid.xml", idn=idn)

class MyHumanoidArmsOnly(MyHumanoid):
    def __init__(self, idn=0):
        super().__init__(idn=idn)
        # Remove leg actuation and freeze in place
        self._remove_joint_actuation("leg")
        self._remove_joint_actuation("head")
        self._remove_joint_actuation("torso")
        self._remove_free_joint()

Related Pages

Page Connections

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