Implementation:Haosulab ManiSkill PickSingleYCB
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Tabletop_Manipulation |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete implementation of the single YCB object picking task environment in ManiSkill.
Description
The PickSingleYCBEnv picks up a random object from the YCB dataset and moves it to a random goal position. The object geometry is randomized by sampling from the YCB dataset (excluding non-graspable objects like windex_bottle, skillet_lid, plate, and chain).
Registered as PickSingleYCB-v1 with max_episode_steps=50 and asset_download_ids=["ycb"]. Supported robots: panda, panda_wristcam, fetch. Reward modes include "normalized_dense", "dense", "sparse", and "none".
Randomizations: object xy position in [-0.1, 0.1], z-axis rotation, goal position xy in [-0.1, 0.1] with z in [0, 0.3] above the object. Success requires the object to be within 0.025m of the goal and the robot to be static. For GPU simulation, 128+ parallel environments are recommended to sample all YCB objects.
Usage
Use this environment for generalized grasping research with diverse object geometries. The YCB dataset provides realistic objects with varying shapes and sizes.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/envs/tasks/tabletop/pick_single_ycb.py
Signature
@register_env("PickSingleYCB-v1", max_episode_steps=50, asset_download_ids=["ycb"])
class PickSingleYCBEnv(BaseEnv):
SUPPORTED_ROBOTS = ["panda", "panda_wristcam", "fetch"]
agent: Union[Panda, PandaWristCam, Fetch]
goal_thresh = 0.025
Import
import gymnasium as gym
import mani_skill.envs
env = gym.make("PickSingleYCB-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 TCP pose, object pose, goal position, is_grasped |
| reward | float | Dense reward: reaching + grasping + placing + static |
| terminated | bool | Whether episode ended by success |
| truncated | bool | Whether episode hit max steps (50) |
| info | dict | Contains success, is_obj_placed, is_robot_static, is_grasped |
Usage Examples
Basic Usage
import gymnasium as gym
import mani_skill.envs
env = gym.make("PickSingleYCB-v1", obs_mode="state", render_mode="rgb_array")
obs, info = env.reset()
for _ in range(50):
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
obs, info = env.reset()
env.close()