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:Haosulab ManiSkill RoboCasaFixture

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

Overview

Concrete tool providing the base Fixture class for all RoboCasa kitchen fixtures, along with the FixtureType enumeration for fixture classification.

Description

This module defines two core components for the RoboCasa fixture system:

FixtureType is an IntEnum that categorizes all fixture types in RoboCasa kitchen environments. It includes 22 types: COUNTER (1), MICROWAVE (2), STOVE (3), SINK (4), CABINET (5), DRAWER (6), SHELF (7), COFFEE_MACHINE (8), various DOOR types (9-15), CABINET_TOP (16), TOASTER (17), DINING_COUNTER (18), TOP_DRAWER (19), STOOL (20), ISLAND (21), and COUNTER_NON_CORNER (22).

Fixture extends MujocoObject and serves as the base class for all physical kitchen fixtures. It handles:

  • Scale computation from desired size via set_scale_from_size()
  • Origin offset calculation from exterior bounding box sites
  • Building both articulated and static actors via the build() method
  • Exterior and interior bounding box site retrieval for collision and placement calculations
  • Reset region computation for object placement on/in fixtures
  • Abstract methods get_state() and update_state() for fixture state management

The Fixture.build() method checks is_articulation to determine whether to build an articulated body (with joints) or a static actor, using the appropriate SAPIEN builder.

Usage

This is the base class -- do not instantiate directly. Subclass it to create specific fixture types (Cabinet, Counter, Sink, Stove, etc.).

Code Reference

Source Location

Signature

class FixtureType(IntEnum):
    COUNTER = 1
    MICROWAVE = 2
    STOVE = 3
    SINK = 4
    CABINET = 5
    # ... (22 total types)

class Fixture(MujocoObject):
    def __init__(self, scene: ManiSkillScene, xml, name,
                 duplicate_collision_geoms=True, pos=None, scale=1,
                 size=None, placement=None, rng=None): ...
    @property
    def is_articulation(self) -> bool: ...
    def build(self, scene_idxs: list[int]): ...
    def set_origin(self, origin): ...
    def set_scale_from_size(self, size): ...
    def get_reset_regions(self, *args, **kwargs) -> dict: ...
    def get_ext_sites(self, all_points=False, relative=True) -> list: ...
    def get_int_sites(self, all_points=False, relative=True) -> list: ...
    def get_bbox_points(self, trans=None, rot=None) -> list: ...
    @abc.abstractmethod
    def get_state(self): ...
    @abc.abstractmethod
    def update_state(self, env): ...
    @property
    def width(self) -> float: ...
    @property
    def depth(self) -> float: ...
    @property
    def height(self) -> float: ...

Import

from mani_skill.utils.scene_builder.robocasa.fixtures.fixture import Fixture, FixtureType

I/O Contract

Property/Method Return Type Description
is_articulation bool True if the fixture has an articulation builder (joints)
width float Width from exterior bounding sites
depth float Depth from exterior bounding sites
height float Height from exterior bounding sites
get_reset_regions() dict Dictionary of placement regions with offset and size
get_ext_sites() list Exterior bounding box corner points (4 or 8)
get_int_sites() list Interior bounding box corner points (4 or 8)
build() Fixture Builds the SAPIEN actor or articulation and returns self

Usage Examples

# Fixture is abstract; use subclasses instead
from mani_skill.utils.scene_builder.robocasa.fixtures.fixture import FixtureType

# Check fixture type
if fixture_is_type(my_fixture, FixtureType.CABINET):
    regions = my_fixture.get_reset_regions()

Related Pages

Page Connections

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