Implementation:Haosulab ManiSkill PutOnInScene
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Digital_Twin |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of digital twin pick-and-place evaluation tasks from the Bridge v2 dataset in ManiSkill.
Description
This file defines several digital twin environments that replicate real-world Bridge v2 dataset scenes for sim-to-real evaluation. All classes extend BaseBridgeEnv. The registered environments include:
PutCarrotOnPlateInScene-v1(max_episode_steps=60): Put a carrot on a plate on a flat table.PutEggplantInBasketScene-v1(max_episode_steps=120): Put an eggplant into a yellow basket in a sink scene.StackGreenCubeOnYellowCubeBakedTexInScene-v1(max_episode_steps=60): Stack a green cube on a yellow cube with baked textures.PutSpoonOnTableClothInScene-v1(max_episode_steps=60): Put a spoon on a towel/table cloth.
All variants require asset_download_ids=["bridge_v2_real2sim"]. Each environment defines specific object configurations (xyz_configs, quat_configs) and evaluation criteria. Language instructions are provided via get_language_instruction().
Usage
Use these environments for sim-to-real evaluation of manipulation policies trained on the Bridge v2 dataset. They provide realistic digital twin scenes matching real-world setups.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/tasks/digital_twins/bridge_dataset_eval/put_on_in_scene.py
Signature
@register_env(
"PutCarrotOnPlateInScene-v1",
max_episode_steps=60,
asset_download_ids=["bridge_v2_real2sim"],
)
class PutCarrotOnPlateInScene(BaseBridgeEnv): ...
@register_env(
"PutEggplantInBasketScene-v1",
max_episode_steps=120,
asset_download_ids=["bridge_v2_real2sim"],
)
class PutEggplantInBasketScene(BaseBridgeEnv): ...
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("PutCarrotOnPlateInScene-v1")
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| obs_mode | str | No | Observation mode |
| reward_mode | str | No | Reward mode |
| control_mode | str | No | Control mode |
Outputs
| Name | Type | Description |
|---|---|---|
| obs | dict/array | Observation based on obs_mode |
| reward | float | Task reward |
| terminated | bool | Whether episode ended by success/failure |
| truncated | bool | Whether episode hit max steps |
| info | dict | Contains success flag |
Usage Examples
Basic Usage
import gymnasium as gym
import mani_skill.envs
env = gym.make("PutCarrotOnPlateInScene-v1", obs_mode="state", render_mode="rgb_array")
obs, info = env.reset()
for _ in range(60):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()