Implementation:Haosulab ManiSkill KitchenObjectUtils
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Scene_Building |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool providing utility classes and functions for managing kitchen object categories, model discovery, and object instantiation in RoboCasa environments.
Description
This module defines the ObjCat class and utility functions for working with kitchen objects in RoboCasa. It bridges between the object category definitions in kitchen_objects.py and the actual MJCF model files on disk.
ObjCat encapsulates metadata for an object category, including:
- Category name and types (e.g., "fruit", "meat", "packaged_food")
- Boolean properties:
graspable,washable,microwavable,cookable,freezable - Model folders pointing to MJCF model directories
- Physics parameters:
scale,solimp,solref,density,friction,priority - Support for both AI-generated (aigen) and Objaverse object models
The module provides model discovery by scanning the BASE_ASSET_ZOO_PATH (which points to the RoboCasa objects asset directory) for available MJCF models. It supports model exclusion lists and separate configurations for AI-generated vs. Objaverse object variants.
Key utility functions include:
- Object category registration and lookup from the
OBJ_CATEGORIESdictionary - Model path resolution for individual object instances
- XML metadata extraction for object dimensions and properties
Usage
Used internally by the RoboCasa scene builder and placement samplers to discover available kitchen object models and instantiate them with appropriate physics properties.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/utils/scene_builder/robocasa/objects/kitchen_object_utils.py
Signature
class ObjCat:
def __init__(self, name, types, model_folders=None, exclude=None,
graspable=False, washable=False, microwavable=False,
cookable=False, freezable=False, scale=1.0,
solimp=(0.998, 0.998, 0.001), solref=(0.001, 2),
density=100, friction=(0.95, 0.3, 0.1),
priority=None, aigen_cat=False): ...
Import
from mani_skill.utils.scene_builder.robocasa.objects.kitchen_object_utils import ObjCat
I/O Contract
| Parameter | Type | Description |
|---|---|---|
name |
str |
Object category name (e.g., "apple", "mug") |
types |
tuple or str |
Category types (e.g., "fruit", "drink") |
model_folders |
list |
Directories containing MJCF models |
exclude |
list |
Model names to exclude from the category |
graspable |
bool |
Whether objects in this category can be grasped |
scale |
float |
Default scale for objects in this category |
density |
float |
Default density for physics simulation (default 100) |
aigen_cat |
bool |
True if using AI-generated models, False for Objaverse |
Usage Examples
from mani_skill.utils.scene_builder.robocasa.objects.kitchen_object_utils import ObjCat
# Create an object category
apple_cat = ObjCat(
name="apple",
types=("fruit",),
graspable=True,
washable=True,
cookable=True,
scale=1.0,
)
# Access category properties
print(apple_cat.graspable) # True
print(apple_cat.types) # ("fruit",)