Implementation:Haosulab ManiSkill TwoRobotPickCube
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Tabletop_Manipulation |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of the two-robot cooperative cube picking task environment in ManiSkill.
Description
The TwoRobotPickCube environment features two Panda robot arms that must cooperate to pick up a red cube and lift it to a goal location. The cube is within reach of the left robot but not the right, while the goal is within reach of the right robot but not the left. This forces handover coordination between the two robots.
Registered as TwoRobotPickCube-v1 with max_episode_steps=100. Uses MultiAgent with two Panda robots. Reward modes include "normalized_dense", "dense", "sparse", and "none".
Randomizations: cube z-rotation randomized, cube xy position in left robot's reachable workspace, goal position in right robot's reachable workspace (marked by green sphere). Success requires the cube to be within the goal threshold distance.
Usage
Use this environment for multi-agent cooperative manipulation research. It tests coordination, handover, and joint planning between two robot arms.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/tasks/tabletop/two_robot_pick_cube.py
Signature
@register_env("TwoRobotPickCube-v1", max_episode_steps=100)
class TwoRobotPickCube(BaseEnv):
agent: MultiAgent
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("TwoRobotPickCube-v1")
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| obs_mode | str | No | Observation mode |
| reward_mode | str | No | Reward mode: "normalized_dense", "dense", "sparse", "none" |
| control_mode | str | No | Control mode for the two Panda robots |
Outputs
| Name | Type | Description |
|---|---|---|
| obs | dict/array | Observation including both robots' TCP poses, cube pose, goal position |
| reward | float | Dense reward based on cooperative reaching, grasping, and placing |
| terminated | bool | Whether episode ended by success |
| truncated | bool | Whether episode hit max steps (100) |
| info | dict | Contains success flag |
Usage Examples
Basic Usage
import gymnasium as gym
import mani_skill.envs
env = gym.make("TwoRobotPickCube-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()