Installation & Startup安装与开机检查
On this page本页内容
Clone and install克隆与安装
For a new workspace, clone LeRobot first, then fetch the BREE repository into the same workspace and switch to its branch. This places both BREE/ and its matching LeRobot source directly under lerobot/.新建工作区时,先克隆 LeRobot,再在同一工作区获取 BREE 仓库并切换到其分支,使 BREE/ 与配套的 LeRobot 源码直接位于 lerobot/ 根目录。
git clone https://github.com/huggingface/lerobot.git
cd lerobot
Fetch the BREE repository and use its complete code tree:获取 BREE 仓库,并切换到其完整代码版本:
git remote add bree https://github.com/YyyYyy0604/BREE-v1.git
git fetch bree
git switch -c bree-v1 --track bree/main
Create the lerobot environment and install the checked-out code with SO-101 motor support:创建 lerobot 环境,并安装当前代码与 SO-101 舵机依赖:
conda create -y -n lerobot python=3.10
conda activate lerobot
conda install ffmpeg -c conda-forge
pip install -e ".[feetech]" # or "[dynamixel]" for example
The Git steps above set up a new workspace; environment and installation commands follow the repository’s installation documentation. The operating instructions below retain BREE/README.md verbatim.上方 Git 步骤用于新建工作区;环境与安装命令取自仓库安装文档。后续操作说明按 BREE/README.md 原文保留。
Start a later session后续运行入口
In a new terminal, start from the parent directory of lerobot before using the entry commands below. If the terminal is already at the repository root after installation, keep that working directory.后续新开终端时,从 lerobot 仓库的上一级目录使用下方入口命令。安装完成后若已位于仓库根目录,保持当前工作目录即可。
This document assumes that all commands are run from the LeRobot repository root:本文档默认所有命令都从 LeRobot 仓库根目录运行:
cd lerobot
conda activate lerobot
If you are not using a Conda environment, first confirm that the current Python can run python -c "import lerobot".如果使用的不是 Conda 环境,也应先确认当前 Python 能够执行 python -c "import lerobot"。
3. Hardware identifiers3. 硬件编号
3.1 Arm serial ports3.1 机械臂串口
The current device mapping is:当前设备约定如下:
| Arm机械臂 | Type类型 | Port端口 | Calibration ID校准 ID |
|---|---|---|---|
| Left follower左从臂 | follower | /dev/ttyACM0 | follower_arm_left |
| Right follower右从臂 | follower | /dev/ttyACM1 | follower_arm_right |
| Left leader左主臂 | leader | /dev/ttyACM2 | leader_arm_left |
| Right leader右主臂 | leader | /dev/ttyACM3 | leader_arm_right |
USB device indices may change after unplugging and reconnecting. Check the actual ports first, rather than relying only on the table.USB 设备重新插拔后,编号可能变化。不要只根据表格判断,必须先检查实际端口。
3.2 Camera devices3.2 相机设备
The camera mapping recorded in CalibrateREADME.md is:CalibrateREADME.md 中记录的相机映射为:
| Camera相机 | Device设备 |
|---|---|
| Global camera全局相机 | /dev/video0 |
| Left wrist camera左腕相机 | /dev/video2 |
| Right wrist camera右腕相机 | /dev/video4 |
Note: confirm the mapping from live views after every startup, and explicitly pass the correct indices in evaluation commands.注意:每次启动后都要根据实时画面确认,并在评估命令中显式传入正确编号。
4. Startup checks and permissions4. 开机检查与权限
4.1 Find serial ports4.1 查找串口
lerobot-find-port
Unplug and reconnect USB devices one at a time to identify the mapping between the four arms and /dev/ttyACM0 through /dev/ttyACM3.逐个拔插 USB,确认四条机械臂与 /dev/ttyACM0~/dev/ttyACM3 的对应关系。
4.2 Grant serial-port permissions4.2 赋予串口权限
sudo chmod 666 /dev/ttyACM0
sudo chmod 666 /dev/ttyACM1
sudo chmod 666 /dev/ttyACM2
sudo chmod 666 /dev/ttyACM3
This usually needs to be repeated after powering off a device, reconnecting USB or restarting the system.设备断电、重新插入 USB 或系统重启后,通常需要重新执行。
4.3 Find cameras4.3 查找相机
lerobot-find-cameras opencv
Record the global, left wrist and right wrist camera indices from their actual views. Later commands use 0 / 2 / 4 as an example; if the current detection results differ, update the commands accordingly.根据实际画面记录全局、左腕和右腕相机编号。后面的命令以 0 / 2 / 4 为例;如果本次检测结果不同,必须同步修改命令。