Implementation:Haosulab ManiSkill TransportBox
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Humanoid_Control |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of the box transport task for the Unitree G1 humanoid robot in ManiSkill.
Description
The TransportBoxEnv requires a Unitree G1 humanoid robot (upper body with head camera) to find a box on one table, pick it up, and transport it to another table. The robot is initialized in a standing pose with arms positioned for grasping.
Registered as UnitreeG1TransportBox-v1 with max_episode_steps=100. The supported robot is unitree_g1_simplified_upper_body_with_head_camera.
Randomizations include the box's xy position in the region [-0.05, -0.05] x [0.2, 0.05] and z-axis rotation in [0, pi/6]. Success is determined by the box resting on top of the target table. Reward modes include "normalized_dense", "dense", "sparse", and "none".
Usage
Use this environment for humanoid manipulation research involving whole-body coordination for pick-and-place tasks across different surfaces.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/tasks/humanoid/transport_box.py
Signature
@register_env("UnitreeG1TransportBox-v1", max_episode_steps=100)
class TransportBoxEnv(BaseEnv):
SUPPORTED_ROBOTS = ["unitree_g1_simplified_upper_body_with_head_camera"]
agent: UnitreeG1UpperBodyWithHeadCamera
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("UnitreeG1TransportBox-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 G1 humanoid |
Outputs
| Name | Type | Description |
|---|---|---|
| obs | dict/array | Observation including robot state, box pose, goal table position |
| reward | float | Reward based on grasping, transporting, and placing the box |
| terminated | bool | Whether episode ended by success/failure |
| 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("UnitreeG1TransportBox-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()