LeRobot documentation

RoboCerebra

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.6.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

RoboCerebra

RoboCerebra 是一个长时程操作基准,用于评估 VLA 中的高层推理、规划和记忆能力。每个回合将多个子目标串联起来,并包含基于语言的中间指令,其构建基于 LIBERO 的模拟器栈(MuJoCo + robosuite,Franka Panda 7-DOF)。

可用任务

RoboCerebra 复用了 LIBERO 的模拟器,因此评估在 LIBERO 的 libero_10 长时程任务套件上运行:

套件CLI 名称任务描述
LIBERO-10libero_1010长时程厨房/客厅任务,串联 3–6 个子目标

数据集中的每个 RoboCerebra 片段都被分割为多个带有自然语言指令的子任务,统一数据集将这些子任务作为独立的监督信号暴露出来。

安装

RoboCerebra 基于 LIBERO 构建,因此您只需要 libero 附加组件:

pip install -e ".[libero]"
RoboCerebra requires Linux (MuJoCo / robosuite). Set the rendering backend before training or evaluation:
export MUJOCO_GL=egl  # for headless servers (HPC, cloud)

评估

RoboCerebra 的评估运行针对 LIBERO 的 libero_10 套件,采用 RoboCerebra 的相机命名方式(image + wrist_image),并额外包含一个空相机槽位,以确保经过三视图训练的策略能够接收到预期的输入布局:

lerobot-eval \
  --policy.path=lerobot/smolvla_robocerebra \
  --env.type=libero \
  --env.task=libero_10 \
  --env.fps=20 \
  --env.obs_type=pixels_agent_pos \
  --env.observation_height=256 \
  --env.observation_width=256 \
  '--env.camera_name_mapping={"agentview_image": "image", "robot0_eye_in_hand_image": "wrist_image"}' \
  --eval.batch_size=1 \
  --eval.n_episodes=10 \
  --eval.use_async_envs=false \
  --policy.device=cuda \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.wrist_image": "observation.images.camera2"}' \
  --policy.empty_cameras=1

推荐的评估回合

在 libero_10 套件中,每个任务包含 10 个回合(共 100 个回合),以实现可复现的基准测试。这与 RoboCerebra 论文中使用的协议一致。

策略输入和输出

观察:

  • observation.state — 8 维本体感觉状态(7 个关节位置 + 夹爪)
  • observation.images.image — 第三人称视角,256×256 HWC uint8
  • observation.images.wrist_image — 手腕摄像头视角,256×256 HWC uint8

操作:

  • Box(-1, 1, shape=(7,)) 中的连续控制 — 末端执行器增量(6D)+ 夹爪(1D)

训练

位于 lerobot/robocerebra_unified 的统一数据集提供了两个 RGB 流以及基于语言的子任务标注:

功能形状描述
observation.images.image(256, 256, 3)第三人称视角
observation.images.wrist_image(256, 256, 3)手腕佩戴式相机
observation.state(8,)关节位置 + 夹爪
action(7,)EEF 增量 + 夹爪

在其基础上微调 SmolVLA 基础模型:

lerobot-train \
  --policy.path=lerobot/smolvla_base \
  --policy.repo_id=${HF_USER}/smolvla_robocerebra \
  --policy.empty_cameras=1 \
  --dataset.repo_id=lerobot/robocerebra_unified \
  '--rename_map={"observation.images.image": "observation.images.camera1", "observation.images.wrist_image": "observation.images.camera2"}' \
  --env.type=libero \
  --env.task=libero_10 \
  '--env.camera_name_mapping={"agentview_image": "image", "robot0_eye_in_hand_image": "wrist_image"}' \
  --output_dir=outputs/smolvla_robocerebra

smolvla_base 要求相机的名称为 camera1–camera3,因此相机参数与 Evaluation 命令中的相同:--rename_map 将数据集中的相机映射到这些名称,而 --env.camera_name_mapping 则在训练期间的评估中为 LIBERO 相机指定数据集的名称。

复现已发表的结果

发布的检查点 lerobot/smolvla_robocerebra 是在 lerobot/robocerebra_unified 上训练的,并使用 评估 部分中的命令进行评估。CI 会在每个涉及该基准测试的 PR 上,使用 --eval.n_episodes=1 运行相同的命令作为冒烟测试。

Update on GitHub