Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Haosulab ManiSkill TwoRobotPickCube

From Leeroopedia
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

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()

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment