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 AssemblingKits

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

Overview

Concrete implementation of the Assembling Kits shape insertion task environment in ManiSkill.

Description

The AssemblingKitsEnv requires a robot to pick up a misplaced shape and insert it into the correct empty slot on a board/kit. The kit geometry, shape types, and positions are randomized across 20 different shapes with rotational symmetry considerations.

Registered as AssemblingKits-v1 with max_episode_steps=200 and asset_download_ids=["assembling_kits"]. The supported robot is panda_wristcam. Reward modes include "sparse" and "none".

Success requires: correct position (within 2cm), correct rotation (within 4 degrees, accounting for symmetry), and the shape being fully inserted into the slot (height < 3mm). Kit configurations are loaded from JSON episode files.

Usage

Use this environment for research on shape-based insertion and precision placement tasks. The diverse shape geometries and rotational symmetry requirements make it a challenging manipulation benchmark.

Code Reference

Source Location

Signature

@register_env(
    "AssemblingKits-v1", asset_download_ids=["assembling_kits"], max_episode_steps=200
)
class AssemblingKitsEnv(BaseEnv):
    SUPPORTED_REWARD_MODES = ["sparse", "none"]
    SUPPORTED_ROBOTS = ["panda_wristcam"]
    agent: Union[PandaWristCam]

Import

import gymnasium as gym
import mani_skill.envs
env = gym.make("AssemblingKits-v1")

I/O Contract

Inputs

Name Type Required Description
obs_mode str No Observation mode
reward_mode str No Reward mode: "sparse", "none"
control_mode str No Control mode for the Panda robot

Outputs

Name Type Description
obs dict/array Observation including TCP pose, object pose, goal position/rotation
reward float Sparse reward when shape is correctly inserted
terminated bool Whether episode ended by success
truncated bool Whether episode hit max steps (200)
info dict Contains success, pos_correct, rot_correct, in_slot flags

Usage Examples

Basic Usage

import gymnasium as gym
import mani_skill.envs

env = gym.make("AssemblingKits-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