Implementation:Haosulab ManiSkill SceneManipulationEnv
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Scene_Manipulation |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of a base scene manipulation environment in ManiSkill for interacting with complex pre-built scenes.
Description
The SceneManipulationEnv provides a base environment for manipulation tasks in complex, pre-built scenes such as ReplicaCAD or AI2-THOR. It places a robot (Panda or Fetch) into a scene built by a configurable scene builder class. This environment has no success/failure metrics or rewards by default -- it is primarily for exploration and visualization.
Registered as SceneManipulation-v1 with max_episode_steps=200. Supported robots are panda and fetch (default: fetch).
The environment accepts a scene_builder_cls parameter (default "ReplicaCAD") to select which scene type to load. It also accepts build_config_idxs and init_config_idxs for controlling which scene configurations to sample. A fixed_scene parameter controls whether the scene is reconfigured on each reset.
Usage
Use this environment as a foundation for custom manipulation tasks in realistic indoor scenes. It supports scene builders for ReplicaCAD and AI2-THOR environments.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/scenes/base_env.py
Signature
@register_env("SceneManipulation-v1", max_episode_steps=200)
class SceneManipulationEnv(BaseEnv):
SUPPORTED_ROBOTS = ["panda", "fetch"]
agent: Union[Panda, Fetch]
def __init__(self, *args, robot_uids="fetch",
scene_builder_cls: Union[str, SceneBuilder] = "ReplicaCAD",
build_config_idxs=None, init_config_idxs=None,
num_envs=1, **kwargs): ...
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("SceneManipulation-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 for the robot |
| scene_builder_cls | str/SceneBuilder | No | Scene builder to use (default: "ReplicaCAD") |
Outputs
| Name | Type | Description |
|---|---|---|
| obs | dict/array | Observation based on obs_mode |
| reward | float | Task reward (none by default) |
| terminated | bool | Whether episode ended |
| truncated | bool | Whether episode hit max steps (200) |
| info | dict | Environment information |
Usage Examples
Basic Usage
import gymnasium as gym
import mani_skill.envs
env = gym.make("SceneManipulation-v1", obs_mode="state", render_mode="rgb_array")
obs, info = env.reset()
for _ in range(100):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()