🧪 新教程持續更新中 · 由機械臂到傳感器,跟隨教程從零搭建
跳到主要內容

第一步:安裝 LeRobot 環境(macOS) ​

黑色主動臂使用 5V6A 電源適配器

白色從動臂使用 12V5A 電源適配器

加權限 ​

image.png

安裝Miniconda ​

https://www.anaconda.com/download

pip換源 ​

Shell
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple

conda換源 ​

Shell
# 清空原有 .condarc 配置(可選,避免衝突)
echo "" > ~/.condarc

# 寫入清華源配置
cat << EOF > ~/.condarc
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
EOF

# 清除緩存使配置生效
conda clean -i

建立虛擬環境 ​

Shell
conda create -y -n lerobot python=3.12

進入虛擬環境 ​

Shell
conda activate lerobot

安裝ffmpeg ​

Shell
conda install ffmpeg=7.1.1 -c conda-forge -y

驗證安裝成功

Shell
ffmpeg

image.png

下載LeRobot ​

  • 下載LeRobot官方代碼庫
Shell
git clone https://github.com/huggingface/lerobot.git

安裝代碼倉庫 ​

Shell
# cd lerobot-main
cd lerobot
pip install -e ".[feetech]"

image.png

image.png

驗證安裝成功 ​

Shell
lerobot-info

python

import lerobot
import torch
torch.cuda.is_available()
import scservo_sdk

image.png

image.png