LeRobot 文件

訂購與組裝零件

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

訂購與組裝零件

首先,請依照官方組裝指南組裝 OMX 硬體。

OMX 組裝指南: https://ai.robotis.com/omx/assembly_guide_omx.html

OMX 機器人出廠時皆已預先配置。馬達 ID、通訊參數和關節偏移量皆已設定完成,因此在使用 LeRobot 之前,無需進行額外的馬達設定或校準。

安裝 LeRobot 🤗

若要安裝 LeRobot,請遵循我們的 安裝指南

除了這些說明之外,您還需要安裝 Dynamixel SDK

pip install -e ".[dynamixel]"

連接機器人

若要為每個匯流排伺服馬達轉接器找到連接埠,請執行此腳本

lerobot-find-port

執行此指令後,當系統提示時,請從主控臂(leader)或跟隨臂(follower)拔下 USB 線並按下 Enter。輸出結果將顯示「The port of this MotorsBus is [port]」。這會識別出該手臂對應的連接埠。對另一隻手臂重複此步驟,以識別兩個連接埠。

Mac
Linux

macOS 上的輸出範例

Finding all available ports for the MotorBus.
['/dev/tty.usbmodem575E0032081', '/dev/tty.usbmodem575E0031751']
Remove the USB cable from your MotorsBus and press Enter when done.

[...Disconnect corresponding leader or follower arm and press Enter...]

The port of this MotorsBus is /dev/tty.usbmodem575E0032081
Reconnect the USB cable.

其中找到的連接埠為:/dev/tty.usbmodem575E0032081,這對應到您的主控 (leader) 或從屬 (follower) 機械手臂。

遠端操作

識別出正確的連接埠後,您就可以使用主控臂直接遠端操作跟隨臂。

Mac
Linux

無攝影機遠端操作

lerobot-teleoperate \
  --robot.type=omx_follower \
  --robot.port=<your_follower_port> \
  --robot.id=omx_follower_arm \
  --teleop.type=omx_leader \
  --teleop.port=<your_leader_port> \
  --teleop.id=omx_leader_arm

在遠端操作期間,跟隨臂會即時鏡像主控臂的動作。由於 OMX 已預先配置,您可以直接開始操作,無需任何校準步驟。

透過攝影機遠端操作

您也可以透過為跟隨臂提供攝影機配置,在遠端操作時啟用攝影機輸入。

lerobot-teleoperate \
  --robot.type=omx_follower \
  --robot.port=<your_follower_port> \
  --robot.id=omx_follower_arm \
  --robot.cameras="{front: {type: opencv, index_or_path: '/dev/video0', width: 640, height: 480, fps: 30}}" \
  --teleop.type=omx_leader \
  --teleop.port=<your_leader_port> \
  --teleop.id=omx_leader_arm \
  --display_data=true

當攝影機啟用後,攝影機影像將即時顯示並與機器人狀態同步。此設定有助於視覺監控,並可在後續用於示範錄製與模仿學習。

恭喜 🎉,您的機器人已準備好自行學習任務了。

如果您有任何問題或需要協助,請透過 Discord 聯繫我們。

在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.