Implementation:Haosulab ManiSkill RoboCasaCabinet
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Scene_Building |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool for procedurally generating cabinet fixtures in RoboCasa kitchen environments, including hinge cabinets, drawers, single cabinets, open cabinets, panel cabinets, and housing cabinets.
Description
This module defines a hierarchy of cabinet fixture classes built on the base Fixture class. Cabinets are procedurally generated using primitive geometries rather than loaded from static mesh files. The base Cabinet class handles shared logic for wall thickness, door gaps, handle attachment, panel creation, and texture application.
The module defines the following cabinet types:
- Cabinet -- Abstract base class with common procedural generation logic including
_create_cab(),_set_texture(), and panel/handle attachment. - SingleCabinet -- A cabinet with a single door panel and a hinge joint, used as a basic unit for kitchen upper/lower cabinets.
- HingeCabinet -- A cabinet with two side-by-side hinge doors, supporting left/right door configurations.
- Drawer -- A cabinet with a sliding drawer mechanism using a prismatic (slide) joint.
- OpenCabinet -- A cabinet with no doors, used as open shelving.
- PanelCabinet -- A cabinet with a fixed decorative panel (no door functionality).
- HousingCabinet -- A cabinet that can house interior objects like sinks or stovetops, with open front.
Each cabinet type overrides _create_cab() to define its specific geometry, joints, and panels. Panels are created by instantiating CabinetPanel subclasses (shaker, slab, raised, etc.) with appropriate handles.
Usage
Use these classes when building RoboCasa kitchen scenes. Cabinets are typically instantiated by the RoboCasa scene builder based on YAML layout configurations that specify cabinet type, size, position, panel style, and handle type.
Code Reference
Source Location
Signature
class Cabinet(Fixture):
def __init__(self, xml, name, size, thickness=0.03, door_gap=0.003,
handle_type="bar", handle_config=None, panel_type="raised",
panel_config=None, open_top=False, texture=None, *args, **kwargs): ...
class SingleCabinet(Cabinet):
def __init__(self, scene, name="single_cabinet", *args, **kwargs): ...
class HingeCabinet(Cabinet):
def __init__(self, scene, name="hinge_cabinet", *args, **kwargs): ...
class Drawer(Cabinet):
def __init__(self, scene, name="drawer", *args, **kwargs): ...
class OpenCabinet(Cabinet):
def __init__(self, scene, name="open_cabinet", *args, **kwargs): ...
class PanelCabinet(Cabinet):
def __init__(self, scene, name="panel_cabinet", *args, **kwargs): ...
class HousingCabinet(Cabinet):
def __init__(self, scene, name="housing_cabinet", interior_obj=None, *args, **kwargs): ...
Import
from mani_skill.utils.scene_builder.robocasa.fixtures.cabinet import (
Cabinet, SingleCabinet, HingeCabinet, Drawer, OpenCabinet, PanelCabinet, HousingCabinet
)
I/O Contract
| Parameter | Type | Description |
|---|---|---|
xml |
str |
Path to MJCF XML template for the cabinet skeleton |
name |
str |
Unique name for the cabinet instance |
size |
list |
Cabinet dimensions as [width, depth, height]
|
thickness |
float |
Wall thickness of cabinet body (default 0.03) |
door_gap |
float |
Gap between door and cabinet body (default 0.003) |
handle_type |
str |
Handle style: "bar", "boxed", or "knob" |
panel_type |
str |
Panel style: "raised", "shaker", "slab", etc. |
texture |
str |
Path to wood/material texture file |
Usage Examples
# Create a hinge cabinet
cabinet = HingeCabinet(
scene=scene,
name="upper_cabinet_1",
size=[0.6, 0.35, 0.7],
handle_type="bar",
panel_type="shaker",
texture="textures/wood/light_wood.png"
)
cabinet.set_pos([1.0, 0.5, 1.5])
cabinet.build(scene_idxs=[0])