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 StandWithMount

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

Overview

StandWithMount is a composite object that generates a flat stand with a four-walled mount protruding from the top, designed for peg-in-hole and insertion tasks.

Description

The StandWithMount class extends CompositeObject to procedurally generate a flat base platform with a square mounting hole formed by four walls. The object consists of a base plate geom and four wall geoms arranged to create a pocket or receptacle. The mount location can be offset from the center of the stand using the mount_location parameter, and the mount's inner width is controlled by mount_width.

The walls are positioned using rotation quaternions derived from axis-angle conversions around the z-axis, with each wall sized to (wall_thickness/2, mount_width/2, (size[2]-base_thickness)/2). An optional visual rim (add_hole_vis) can be added as a green semi-translucent box at the top of the walls to highlight the hole location. The stand includes a mount_site at the top center for reference positioning.

A key feature is the initialize_on_side option (True by default), which rotates the entire stand 90 degrees about the Y-axis via the init_quat property, laying it flat so the mount faces horizontally. This is commonly used for horizontal peg insertion tasks. The object uses Brass material by default for textured rendering and supports configurable MuJoCo solver parameters (solref, solimp) for fine-tuned contact behavior.

Usage

Use StandWithMount for peg-in-hole insertion tasks, assembly tasks, or any scenario requiring a receptacle mounted on a stand. Set initialize_on_side=True for horizontal insertion tasks or False for vertical insertion tasks. Configure mount_width relative to the peg size to control insertion difficulty.

Code Reference

Source Location

Signature

class StandWithMount(CompositeObject):
    def __init__(
        self,
        name,
        size=(0.3, 0.3, 0.15),
        mount_location=(0.0, 0.0),
        mount_width=0.05,
        wall_thickness=0.01,
        base_thickness=0.01,
        initialize_on_side=True,
        add_hole_vis=False,
        friction=None,
        density=1000.0,
        solref=(0.02, 1.0),
        solimp=(0.9, 0.95, 0.001),
        use_texture=True,
        rgba=(0.2, 0.1, 0.0, 1.0),
    ):

Import

from robosuite.models.objects.composite.stand_with_mount import StandWithMount

I/O Contract

Inputs

Name Type Required Description
name str Yes Name of this object
size tuple(3) No (x, y, z) full size of the stand. Default: (0.3, 0.3, 0.15)
mount_location tuple(2) No (x, y) offset of mount from stand center. Default: (0.0, 0.0)
mount_width float No Width of the mount opening (outside wall-to-wall). Default: 0.05
wall_thickness float No Thickness of mount walls. Default: 0.01
base_thickness float No Thickness of the base plate. Default: 0.01
initialize_on_side bool No If True, rotates stand 90 degrees so mount faces horizontally. Default: True
add_hole_vis bool No If True, adds a green visual rim around the mount hole. Default: False
friction tuple(3) or None No Friction values. Default: None
density float No Density value for all geoms. Default: 1000.0
solref tuple(2) No MuJoCo solver reference parameters. Default: (0.02, 1.0)
solimp tuple(3) No MuJoCo solver impedance parameters. Default: (0.9, 0.95, 0.001)
use_texture bool No If True, use Brass textures. Default: True
rgba tuple(4) or None No RGBA values when not using textures. Default: (0.2, 0.1, 0.0, 1.0)

Outputs

Name Type Description
StandWithMount instance CompositeObject Stand with four-walled mount receptacle
init_quat np.array Quaternion (x, y, z, w) for initialization; rotated if initialize_on_side is True
base_geoms list[str] List containing the name-prefixed base geom name

Usage Examples

from robosuite.models.objects.composite.stand_with_mount import StandWithMount

# Create a stand for horizontal peg insertion (default, on its side)
stand = StandWithMount(name="peg_stand")

# Create a stand for vertical insertion, with visible hole marker
stand = StandWithMount(
    name="vertical_stand",
    size=(0.25, 0.25, 0.12),
    mount_width=0.04,
    initialize_on_side=False,
    add_hole_vis=True,
)

# Create a stand with off-center mount
stand = StandWithMount(
    name="offset_stand",
    mount_location=(0.05, -0.03),
    mount_width=0.06,
)

# Access initialization quaternion
print(stand.init_quat)  # rotated or identity depending on initialize_on_side

Related Pages

Page Connections

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