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.

Principle:ARISE Initiative Robosuite Robot Variant Composition

From Leeroopedia
Revision as of 18:01, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/ARISE_Initiative_Robosuite_Robot_Variant_Composition.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Robotics, Simulation, Software Composition
Last Updated 2026-02-15 07:00 GMT

Overview

A compositional approach to creating robot variants by inheriting from existing robot model classes and overriding specific properties such as default base type, gripper type, initial joint configuration, and workspace positioning offsets.

Description

Real-world robotics frequently involves combining the same manipulator arm with different bases, grippers, or mounting configurations to create distinct robot setups. Rather than defining each combination as an entirely new model with its own XML file, a compositional approach allows new robot variants to be created by subclassing an existing robot model and overriding only the properties that differ. This produces lightweight variant definitions that are easy to maintain and reason about.

A compositional robot variant typically overrides a small set of properties on a parent robot model class. The most common overrides include the default base type (switching from a fixed mount to a wheeled or legged platform), the default gripper (substituting a parallel-jaw gripper with a dexterous hand), the initial joint configuration (adjusting arm pose for the new base height or workspace), and workspace positioning offsets (which specify where the robot should be placed relative to tables or bins of different sizes). Some variants also override gripper mount position and quaternion offsets to handle mechanical differences in the attachment interface between the arm and an alternative gripper.

This compositional pattern leverages the metaclass-based robot registration system: each new subclass is automatically registered under its class name and becomes available for instantiation through the robot factory. This means environment configurations can reference any variant by name without needing to know its implementation details, and switching between variants requires only changing a string identifier.

Usage

Apply this principle when you need to create a new robot configuration that combines an existing arm with a different base or gripper. Instead of creating a new XML model from scratch, subclass the appropriate robot model, override the relevant property methods, and rely on the automatic registration system to make the variant available throughout the framework.

Theoretical Basis

The composition pattern relies on property override inheritance:

class BaseRobot(ManipulatorModel):
    @property
    def default_base(self): return "FixedMount"
    @property
    def default_gripper(self): return {"right": "ParallelJawGripper"}
    @property
    def init_qpos(self): return [0, 0, 0, -pi/2, 0, pi/2, pi/4]
    @property
    def base_xpos_offset(self):
        return {"table": lambda L: (-0.5 - L/2, 0, 0)}

class MobileVariant(BaseRobot):
    @property
    def default_base(self): return "WheeledPlatform"
    @property
    def init_qpos(self): return [adjusted_values...]
    @property
    def base_xpos_offset(self):
        return {"table": lambda L: (-0.16 - L/2, 0, 0)}

Gripper mount adjustments handle mechanical interface differences:

class DexterousVariant(BaseRobot):
    @property
    def default_gripper(self): return {"right": "DexterousHand"}
    @property
    def gripper_mount_pos_offset(self): return {"right": [0.0, 0.0, 0.0]}
    @property
    def gripper_mount_quat_offset(self): return {"right": [-0.5, 0.5, 0.5, -0.5]}

The workspace offset uses a lambda pattern to compute position relative to environment fixtures:

base_xpos_offset = {
    "table": lambda table_length: (x_offset - table_length/2, y_offset, z_offset),
    "bins":  (fixed_x, fixed_y, fixed_z),
    "empty": (fixed_x, fixed_y, fixed_z),
}

This allows the same variant to be correctly positioned regardless of table dimensions.

Related Pages

Page Connections

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