LeRobot 项目部署运行逻辑(三)——机器人及舵机配置

Lerobot 目前的机器人硬件以舵机类型为主,并未配置机器人正逆运动学及运动学,遥操作映射以舵机关节角度为主

因此,需要在使用前需要对舵机各项参数及初始位置进行配置

目录

[1 Mobile ALOHA 配置](#1 Mobile ALOHA 配置)

[2 Dynamixel 配置](#2 Dynamixel 配置)

[2.1 配置软件](#2.1 配置软件)

[2.2 SDK](#2.2 SDK)

[3 Lerobot 配置](#3 Lerobot 配置)


1 Mobile ALOHA 配置

对于 Mobile ALOHA 的配置,可以参考 Aloha and Aloha 2 stationary,其中分为了两个版本:

ALOHA 2.0

ALOHA 1.0

Github:Trossen Robotics Github

软硬件配置均有详细说明:

四个臂配置:

2 Dynamixel 配置

ALOHA 采用的是 Dynamixel 舵机,这个舵机算是老朋友了,Dexcap灵巧手用的也是它,性能真的挺好,价格真的挺贵

舵机配置有两种方法:

  1. Dynamixel 官方配置软件
  2. Dynamixel SDK

2.1 配置软件

详细资料及教程可以参考 DYNAMIXEL Wizard 2.0,其支持的 os:

  • Windows 7 / 8.1 / 10 (32 bit and 64 bit)
  • Linux
    • Ubuntu 18.04 (64 bit)
    • Ubuntu 16.04 (64 bit)
  • MacOS 10.12 / 10.13 / 10.14 (64bit)

配置软件下载:网址

配置过程直接参考教程就可以了,界面如下:

2.2 SDK

详细资料及教程可以参考 get_started_with_real_robot

使用 DynamixelMotorsBus 通过对应的 USB 总线以链式方式与舵机通信

此类封装了 Python 版 Dynamixel SDK,方便对舵机的读写操作

首次配置舵机需要拔下每个舵机电源,然后运行命令识别。舵机会将自己的 ID 保存在内部,所以每个舵机只需配置一次

先配置 Leader 臂,插入第 1 个舵机,运行 configure_motor.py:

python 复制代码
python lerobot/scripts/configure_motor.py \
  --port /dev/tty.usbmodem58760432961 \
  --brand dynamixel \
  --model xl330-m288 \
  --baudrate 1000000 \
  --ID 1

然后拔下第 1 个舵机,插入第 2 个,运行相同命令,只需修改舵机型号和 ID

依次类推,直到为 Leader 臂的所有 6 个舵机设置好

再配置 Follower 臂,舵机型号包括 xl430-w250 和 xl330-m288 等

3 Lerobot 配置

对于 Aloha bimanual robot,使用 AlohaRobotConfig 来设置不同的设置,例如阴影关节(肩部、肘部为两个电机)的辅助 ID

Lerobot 新版本在架构上进行了很大的更改,配置文件也全部变成了.py 和 .json

LeRobot 针对 Aloha 机器人的默认校准文件为.cache/calibration/aloha_default。假设电机已正确组装,则 Aloha 机器人无需手动校准步骤

简单记一下:

homing_offset:归零位置

drive_mode:驱动模式

start_pos:初始位置

end_pos:结束位置

calib_mode:标定模式

motor_names:舵机命名

因为第9个舵机为线性,因此配置时计算方式为(end_pos-start_pos)%

如果安装前没有将舵机归零,需要标定后修改 start_pos 和 end_pos 参数,否则会报错超限:

Wrong motor position detected for gripper. Expected to be in nominal range of [0,100]%(a full linear translation), with a maximum range range of[-10,110]% to account for some imprecision during calibration,present value is -145.748291015625 %, This might be due to a cable connection issue creating an artificial jump in motor values. You need to recalibrate by running'python lerobot/scripts/control robot.py calibrate'

相关推荐
Anastasiozzzz3 小时前
深入研究RAG: 在线阶段-查询&问答
数据库·人工智能·ai·embedding
tq10863 小时前
资本主义的时间贴现危机:AI时代的结构性淘汰机制
人工智能
砍材农夫3 小时前
spring-ai 第四多模态API
java·人工智能·spring
土豆12506 小时前
LangGraph TypeScript 版入门与实践
人工智能·llm
土豆12506 小时前
OpenSpec:让 AI 编码助手从"乱猜"到"照单执行"
人工智能·llm
Thomas.Sir6 小时前
第二章:LlamaIndex 的基本概念
人工智能·python·ai·llama·llamaindex
m0_694845577 小时前
Dify部署教程:从AI原型到生产系统的一站式方案
服务器·人工智能·python·数据分析·开源
LS_learner7 小时前
VS Code 终端默认配置从 PowerShell 改为 CMD
人工智能
小毅&Nora8 小时前
【人工智能】【大模型】大模型“全家桶”到“精兵简政”:企业AI落地的理性进化之路
人工智能·大模型·平安科技
KaneLogger8 小时前
如何把AI方面的先发优势转化为结构优势
人工智能·程序员·架构