Implementation:Haosulab ManiSkill RoboCasaCounter
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Scene_Building |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool for creating procedurally generated kitchen counter fixtures in RoboCasa environments, supporting overhang, hollow bases, interior objects (sinks, stovetops), and configurable textures.
Description
The Counter class extends Fixture to represent kitchen countertops. Counters are complex fixtures consisting of a top surface and a base structure. The implementation supports several configuration options:
- Overhang -- The counter top can extend beyond the base, controlled by the
overhangparameter. - Hollow bases -- The base can be fully or partially hollow to accommodate lower cabinets, controlled by
hollow=[back, front]. - Base openings -- Openings in the front or back of the base, controlled by
base_opening=[front, back]. - Half tops -- For corner alignment, the top can be halved on the left or right side.
- Interior objects -- Counters can house interior objects like sinks or stovetops, with configurable placement percentages (
obj_x_percent,obj_y_percent). - Separate textures for top and base surfaces.
The counter distinguishes between two XML templates: one for regular counters and one for counters with interior object openings. The _create_counter() method computes all geometry positions and sizes programmatically based on the counter parameters.
The module also includes reset region computation for object placement on counters, with methods to return valid placement areas on the counter surface.
Usage
Used when constructing RoboCasa kitchen scenes. Counters are instantiated by the scene builder based on layout configurations and may contain interior fixtures like sinks and stovetops.
Code Reference
Source Location
Signature
class Counter(Fixture):
material_overrides = dict()
def __init__(self, scene: ManiSkillScene, name="counter", size=(0.72, 0.60, 0.60),
overhang=0, top_texture=None, top_thickness=0.03,
half_top=[False, False], base_texture=None, base_color=None,
base_opening=[False, False], hollow=[False, True],
interior_obj=None, obj_y_percent=0.5, obj_x_percent=0.5,
*args, **kwargs): ...
def _create_counter(self): ...
def get_reset_regions(self, *args, **kwargs): ...
def build(self, scene_idxs: list[int]): ...
Import
from mani_skill.utils.scene_builder.robocasa.fixtures.counter import Counter
I/O Contract
| Parameter | Type | Default | Description |
|---|---|---|---|
scene |
ManiSkillScene |
-- | The simulation scene |
name |
str |
"counter" | Unique counter name |
size |
tuple |
(0.72, 0.60, 0.60) | Counter dimensions (width, depth, height) |
overhang |
float |
0 | How much the top extends beyond the base |
top_texture |
str |
None | Texture path for the counter top |
top_thickness |
float |
0.03 | Thickness of the counter top slab |
hollow |
list |
[False, True] | Whether to hollow out back/front of base |
interior_obj |
Fixture | None | Fixture to embed in the counter (e.g., Sink, Stovetop) |
Usage Examples
# Create a basic counter
counter = Counter(
scene=scene,
name="kitchen_counter",
size=(1.2, 0.6, 0.9),
top_texture="textures/stone/granite.png",
base_texture="textures/wood/dark_wood.png",
overhang=0.03,
)
counter.set_pos([0, 0, 0.45])
counter.build(scene_idxs=[0])
# Counter with embedded sink
sink = Sink(scene=scene, name="kitchen_sink")
counter_with_sink = Counter(
scene=scene,
name="sink_counter",
size=(0.72, 0.60, 0.60),
interior_obj=sink,
obj_y_percent=0.5,
)