EarthRover Mini Plus 是一款完全开源的移动机器人,通过 Frodobots SDK 连接云端。这让你能够控制机器人并录制 dataset 以训练 AI 模型。
机器人需要在你电脑上运行 Frodobots SDK。方法如下:
git clone https://github.com/frodobots-org/earth-rovers-sdk.git
cd earth-rovers-sdk
pip install -r requirements.txt用 Frodobots 团队提供的 SDK API 密钥和机器人名称填写你的 .env 变量。
SDK_API_TOKEN=your_sdk_api_token_here
BOT_SLUG=your_bot_slug_here
CHROME_EXECUTABLE_PATH=/path/to/chrome_or_chromium
# Default value is MAP_ZOOM_LEVEL=18 https://wiki.openstreetmap.org/wiki/Zoom_levels
MAP_ZOOM_LEVEL=18
MISSION_SLUG=your_mission_slug_here
# Image quality between 0.1 and 1.0 (default: 0.8)
# Recommended: 0.8 for better performance
IMAGE_QUALITY=0.8
# Image format: jpeg, png or webp (default: png)
# Recommended: jpeg for better performance and lower bandwidth usage
IMAGE_FORMAT=jpeghypercorn main:app --reload
http://localhost:8000,然后点击“Join”SDK 为你提供:
SDK 必须处于运行状态,你才能使用机器人。
按照我们的 安装指南 安装 LeRobot。
在基础安装之外,请安装带硬件依赖的 EarthRover Mini:
pip install -e ".[hardware]"机器人通过互联网进行通信:
你无需插接任何东西——一切都通过 SDK 工作。
无需 calibration!只要 SDK 运行,机器人即可直接使用。
你可以像用 WASD 键玩电子游戏一样,通过键盘控制机器人。
| 按键 | action |
|---|---|
| W | 向前移动 |
| S | 向后移动 |
| A | 左转(伴随前进运动) |
| D | 右转(伴随前进运动) |
| Q | 原地向左旋转 |
| E | 原地向右旋转 |
| X | 停止所有运动 |
| +/= | 提高速度 |
| - | 降低速度 |
| ESC | 断开连接 |
你可以调整机器人的移动速度:
在录制数据之前先试驾一下机器人:
from lerobot.robots.earthrover_mini_plus import EarthRoverMiniPlus, EarthRoverMiniPlusConfig
from lerobot.teleoperators.keyboard import KeyboardRoverTeleop, KeyboardRoverTeleopConfig
# Initialize robot
robot_config = EarthRoverMiniPlusConfig()
robot = EarthRoverMiniPlus(robot_config)
# Initialize teleoperator
teleop_config = KeyboardRoverTeleopConfig(
linear_speed=1.0,
angular_speed=1.0,
speed_increment=0.1
)
teleop = KeyboardRoverTeleop(teleop_config)
# Connect
robot.connect()
teleop.connect()
# Teleoperate (use keyboard controls)
try:
while True:
action = teleop.get_action()
robot.send_action(action)
except KeyboardInterrupt:
pass
finally:
robot.disconnect()
teleop.disconnect()如果你使用的是 Mac,可能需要授予“终端”访问键盘的权限以进行 teleoperation。前往“系统偏好设置”>“安全性与隐私”>“输入监控”,并勾选“终端”。
一旦你能熟练驾驶机器人,就可以开始录制数据来训练 AI 模型。系统会记录:
我们使用 Hugging Face 在线上存储你的数据。首先,使用 Hugging Face 设置 中的 token 登录:
hf auth login --token ${HUGGINGFACE_TOKEN} --add-to-git-credential保存你的 Hugging Face 用户名:
HF_USER=$(hf auth whoami | awk -F': *' 'NR==1 {print $2}')
echo $HF_USER使用标准录制命令:
lerobot-record \
--robot.type=earthrover_mini_plus \
--teleop.type=keyboard_rover \
--dataset.repo_id=your_username/dataset_name \
--dataset.num_episodes=2 \
--dataset.fps=10 \
--dataset.single_task="Navigate around obstacles" \
--dataset.streaming_encoding=true \
--dataset.encoder_threads=2 \
--display_data=true
# Optional: --dataset.rgb_encoder.vcodec=auto将 your_username/dataset_name 替换为你的 Hugging Face 用户名以及你的 dataset 名称。
你的 dataset 包含:
你的 action(2 个特征):
linear_velocity:你前进/后退了多少angular_velocity:你左转/右转了多少机器人 observation(24 个特征):
在你电脑上:~/.cache/huggingface/lerobot/{repo-id}
录制完成后,你的数据会自动上传到你的 Hugging Face 页面:
echo https://huggingface.co/datasets/${HF_USER}/earthrover-navigation你的 dataset 将被打上 LeRobot 标签,便于社区发现。