BREE

Teleoperation & Data Collection遥操作与数据采集

On this page本页内容

7. Dual-arm teleoperation check7. 双臂遥操作检查

Run teleoperation before formal data collection to confirm the leader/follower mapping, joint directions and all three camera views:在正式采集前先运行遥操作,确认主从臂对应关系、关节方向和三个相机画面都正确:

bash
lerobot-teleoperate \
  --robot.type=bi_so_follower \
  --robot.id=follower_arm \
  --robot.left_arm_config.port=/dev/ttyACM0 \
  --robot.right_arm_config.port=/dev/ttyACM1 \
  --robot.left_arm_config.use_degrees=true \
  --robot.right_arm_config.use_degrees=true \
  --robot.left_arm_config.cameras="{global: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \
  --robot.right_arm_config.cameras="{wrist: {type: opencv, index_or_path: 4, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \
  --teleop.type=bi_so_leader \
  --teleop.id=leader_arm \
  --teleop.left_arm_config.port=/dev/ttyACM2 \
  --teleop.right_arm_config.port=/dev/ttyACM3 \
  --teleop.left_arm_config.use_degrees=true \
  --teleop.right_arm_config.use_degrees=true \
  --fps=30 \
  --display_data=true

If the detected camera indices are not 0 / 2 / 4, update the three index_or_path values.如果相机编号检测结果不是 0 / 2 / 4,修改三个 index_or_path。

8. Task reference images8. 任务参考图

Task reference images are used to restore the scene layout before each episode. The following structure is recommended:任务参考图用于在每个 episode 开始前恢复场景摆放。建议使用以下结构:

text
BREE/camera_reference/tasks/<task_name>/
├── pic1.jpg
├── pic2.jpg
└── ...

If there is only one reference image, any unambiguous filename can also be used, for example:如果只有一张参考图,也可以使用任意明确的文件名,例如:

text
BREE/camera_reference/tasks/<task_name>/reference.jpg

9. Data collection9. 数据采集

The following is a unified data-collection template. Before running it, update the dataset name, task description, episode count, durations and reference-image path.下面是一份统一的数据采集模板。运行前必须修改数据集名称、任务描述、episode 数量、时长和参考图路径。

bash
HF_HUB_DISABLE_XET=1 lerobot-record \
  --robot.type=bi_so_follower \
  --robot.id=follower_arm \
  --robot.left_arm_config.port=/dev/ttyACM0 \
  --robot.right_arm_config.port=/dev/ttyACM1 \
  --robot.left_arm_config.use_degrees=true \
  --robot.right_arm_config.use_degrees=true \
  --robot.left_arm_config.cameras="{global: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: MJPG}, wrist: {type: opencv, index_or_path: 2, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \
  --robot.right_arm_config.cameras="{wrist: {type: opencv, index_or_path: 4, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \
  --teleop.type=bi_so_leader \
  --teleop.id=leader_arm \
  --teleop.left_arm_config.port=/dev/ttyACM2 \
  --teleop.right_arm_config.port=/dev/ttyACM3 \
  --teleop.left_arm_config.use_degrees=true \
  --teleop.right_arm_config.use_degrees=true \
  --enable_home_hotkey=true \
  --home_duration_s=2 \
  --display_data=true \
  --play_sounds=true \
  --dataset.repo_id=YOUR_NAME/YOUR_DATASET \
  --dataset.single_task="YOUR TASK DESCRIPTION" \
  --dataset.num_episodes=50 \
  --dataset.episode_time_s=60 \
  --dataset.reset_time_s=40 \
  --dataset.push_to_hub=false \
  --scene_reference=BREE/camera_reference/tasks/YOUR_TASK \
  --scene_reference_camera=global \
  --scene_overlay_alpha=0.4 \
  --episodes_per_reference=1 \
  --scene_home_requires_h=true \
  --require_leader_home_alignment=true \
  --leader_home_tolerance=8

Reference-image parameters:参考图参数说明:

Continue to the separate model training guide.下一步请进入独立的模型训练指南。