AgentSkillsCN

corner-centric-robotics

基于MuJoCo的机器人操控研究,通过以角落为中心的观测空间实现策略迁移。适用于以下场景:(1) 开发MuJoCo环境以支持操控任务;(2) 采集带有预设策略的演示数据;(3) 训练ACT/模仿学习策略;(4) 评估对称机械臂间的策略迁移效果;(5) 任何涉及以角落为中心的操控项目的任务。

SKILL.md
--- frontmatter
name: corner-centric-robotics
description: MuJoCo-based robotic manipulation research for policy transfer via corner-centric observation spaces. Use when working on (1) MuJoCo environment development for manipulation tasks, (2) collecting demonstrations with scripted policies, (3) training ACT/imitation learning policies, (4) evaluating policy transfer across symmetric arms, or (5) any task involving this corner-centric manipulation project.

Corner-Centric Robotics Skill

Research project for validating policy transfer via corner-centric observation/action space design.

Project Context

Core Hypothesis: A policy trained on Arm 0 can transfer to Arm 1 (symmetric about Y-axis) through corner-centric observation design.

Key Insight: Express observations relative to the active corner, flip x-coordinate for symmetric arms.

python
# Corner-centric transformation
ee_local = ee_pos - corner_pos
if arm == 1:
    ee_local[0] = -ee_local[0]  # Flip x for symmetry

Project Structure

code
corner-centric-manip/
├── envs/
│   ├── bimanual_env.py    # BimanualCornerEnv + ScriptedPolicy
│   └── scene.xml          # MuJoCo scene (2 arms, 2 cameras)
├── scripts/
│   ├── collect_data.py    # Data collection → HDF5
│   └── test_env.py        # Environment tests
├── data/                  # HDF5 demonstrations
└── models/                # Trained policies

Quick Reference

Environment API

python
from envs import BimanualCornerEnv, ScriptedPolicy

env = BimanualCornerEnv()
obs = env.reset(arm_idx=0, randomize=True)
# obs = {"image": (H,W,3), "qpos": (4,), "target": (3,)}

action = np.array([dx, dy, dz, grasp])  # Corner-centric frame
obs, reward, done, info = env.step(action)

Data Format (HDF5)

code
/demo_N/observations/image   (T, 240, 320, 3) uint8
/demo_N/observations/qpos    (T, 4) float32  
/demo_N/actions              (T, 4) float32

Experiment Matrix

ExpTrainTestExpected
BaselineArm 0Arm 0~85%
CoreArm 0Arm 1~70%+
AblationArm 0 (global)Arm 1~30%

Detailed References

Common Tasks

TaskLocation
Add cameraenvs/scene.xml - add <camera> with symmetric position
Modify observationBimanualCornerEnv.get_obs() in envs/bimanual_env.py
Change action scaleaction_scale param in BimanualCornerEnv.__init__()
Debug symmetrypython scripts/test_env.py --test symmetry
Collect datapython scripts/collect_data.py --n_demos 50 --arm 0