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 PullCubeTool

From Leeroopedia
Knowledge Sources
Domains Robotics, Simulation, Tabletop_Manipulation
Last Updated 2026-02-15 08:00 GMT

Overview

Concrete implementation of the tool-assisted cube pulling task environment in ManiSkill.

Description

The PullCubeToolEnv requires a robot to use an L-shaped tool to pull a cube that is out of the robot's direct reach into a reachable region. The tool is within reach of the robot, but the cube is positioned beyond the arm's reach.

Registered as PullCubeTool-v1 with max_episode_steps=100. Supported robots: panda and fetch. Reward modes include "normalized_dense", "dense", "sparse", and "none".

Randomizations: cube position is in a region out of direct arm reach but within tool reach, and the goal region is within arm reach. The L-shaped tool is placed near the robot. Success requires pulling the cube into the target region using the tool.

Usage

Use this environment for tool-use manipulation research. It tests the ability to understand and leverage tool affordances to extend the robot's effective workspace.

Code Reference

Source Location

Signature

@register_env("PullCubeTool-v1", max_episode_steps=100)
class PullCubeToolEnv(BaseEnv):
    SUPPORTED_ROBOTS = ["panda", "fetch"]
    agent: Union[Panda, Fetch]

Import

import gymnasium as gym
import mani_skill.envs
env = gym.make("PullCubeTool-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 robot

Outputs

Name Type Description
obs dict/array Observation including tool pose, cube pose, goal position, TCP pose
reward float Dense reward based on reaching tool, grasping, pulling cube to goal
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("PullCubeTool-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