Implementation:Haosulab ManiSkill RoboCasaCabinetPanels
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Scene_Building |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool for creating procedurally generated cabinet panel fixtures in RoboCasa kitchen environments, including various panel styles and shelf components.
Description
This module defines the CabinetPanel base class and several panel style subclasses used to create the visible door/drawer panels for cabinets. Panels are procedurally generated by computing positions and sizes of geometric primitives (boxes) from the panel's overall dimensions. Each panel type defines its own visual profile through different arrangements of trim, inset, and raised elements.
Panel types defined:
- CabinetPanel -- Abstract base class handling handle attachment (
_add_handle), texture application (_set_texture), and geometry dimension setting (set_geom_dimensions). - ShakerCabinetPanel -- Panel with a recessed center and surrounding frame, common in traditional kitchen designs.
- SlabCabinetPanel -- A flat, featureless panel representing a modern minimalist style.
- RaisedCabinetPanel -- Panel with a raised center section within a recessed frame.
- DividedWindowCabinetPanel -- Panel with a glass window divided into sections.
- FullWindowedCabinetPanel -- Panel with a single large glass window.
- CabinetShelf -- A simple horizontal shelf component for open cabinets.
The base class manages handle creation by instantiating the appropriate handle type (BarHandle, BoxedHandle, or KnobHandle) and computing handle position based on handle_hpos (left/right) and handle_vpos (top/bottom/center) parameters.
Usage
Cabinet panels are instantiated internally by Cabinet subclasses during the _create_cab() method. The panel type is selected based on the panel_type parameter passed to the cabinet constructor.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/utils/scene_builder/robocasa/fixtures/cabinet_panels.py
Signature
class CabinetPanel(MujocoObject):
geom_names: list[str]
geom_names_set: set[str]
material_overrides: dict[str, sapien.render.RenderMaterial] = {}
def __init__(self, scene, xml, size, name, handle_type="bar",
handle_config=None, handle_hpos=None, handle_vpos=None, texture=None): ...
def set_geom_dimensions(self, sizes, positions, rotated=False): ...
def _create_panel(self): ... # abstract
def _set_texture(self): ...
def _add_handle(self): ...
class ShakerCabinetPanel(CabinetPanel): ...
class SlabCabinetPanel(CabinetPanel): ...
class RaisedCabinetPanel(CabinetPanel): ...
class DividedWindowCabinetPanel(CabinetPanel): ...
class FullWindowedCabinetPanel(CabinetPanel): ...
class CabinetShelf(MujocoObject): ...
Import
from mani_skill.utils.scene_builder.robocasa.fixtures.cabinet_panels import (
CabinetPanel, ShakerCabinetPanel, SlabCabinetPanel, RaisedCabinetPanel,
DividedWindowCabinetPanel, FullWindowedCabinetPanel, CabinetShelf
)
I/O Contract
| Parameter | Type | Description |
|---|---|---|
scene |
ManiSkillScene |
The simulation scene to add the panel to |
xml |
str |
Path to MJCF XML template for the panel |
size |
list |
Panel dimensions as [width, depth, height]
|
name |
str |
Unique identifier for this panel instance |
handle_type |
str |
"bar", "boxed", or "knob" |
handle_hpos |
str |
Horizontal handle position: "left" or "right" |
handle_vpos |
str |
Vertical handle position: "top", "bottom", or "center" |
texture |
str |
Path to texture file for the panel surface |
Usage Examples
# Typically instantiated by Cabinet._create_cab(), not directly
panel = ShakerCabinetPanel(
scene=scene,
xml="fixtures/cabinet_panels/shaker_panel.xml",
size=[0.3, 0.02, 0.5],
name="cabinet_door_panel",
handle_type="bar",
handle_hpos="left",
handle_vpos="center",
texture="textures/wood/light_wood.png"
)