
LeRobot LeKiwi 入門 (2) - LeRobotのインストールとLeKiwiの組み立て
「LeKiwi」のLeRobotのインストールとLeKiwiの組み立ての手順をまとめました。
この入門記事は、「Seeed Studio」のご支援により提供されています。
・lerobot 0.4.1
前回
1. LeRobotの インストール
LeRobotのドキュメントの最新仕様を反映しています。
1-1. Raspberry Pi
(1) Miniconda のインストール。
(2) プロジェクト作成とアクティベート。
conda create -y -n lerobot python=3.10
conda activate lerobot(4) LeRobotのインストール。
git clone https://github.com/huggingface/lerobot.git ~/lerobot
conda install ffmpeg -c conda-forge
cd ~/lerobot
pip install -e ".[lekiwi,feetech,zeromq]"1-2. PC
(1) Miniconda のインストール。
(2) プロジェクト作成とアクティベート。
conda create -y -n lerobot python=3.10
conda activate lerobot(3) LeRobotのインストール。
今回は、LeKiwi用にフォークされてる安定版を使います。
git clone https://github.com/huggingface/lerobot.git ~/lerobot
conda install ffmpeg -c conda-forge
cd ~/lerobot
pip install -e ".[lekiwi,feetech,zeromq]"2. 組み立て
2-1. ベースプレートへのモーターの設置
(1) 12本のm2x6タップスクリューを使用して、モーターをモーターマウントに取り付ける。


(2) 12本のm3x16機械ねじを使用して、モーターマウントを底面ベースプレートにねじ込む。
モーターにはマスキングテープなどでIDを記してください。ID 8は後輪、ID 7は左前輪、ID 9は右前輪に対応します。


2-2. モーターへのオムニホイールの設置
(1) オムニホイールから3本のねじを取り外す。


(2) 9本のm4x18機械ねじを使用して、ホイールハブをオムニホイールに取り付け。


(3) 6本のm3x16機械ねじを使用して、サーボホーンをホイールハブに取り付け。



(4) 3本のm3x10機械ねじを使用して、サーボホーンを駆動モーターに取り付け。



2-3. サーボドライバーとモーターのセットアップ
(1) サーボドライバーを組み立て、USBコネクタはUSBケーブルでPCと、電源入力は電源アダプタで電源と接続。

(2) サーボドライバーのポート番号の確認。
以下のコマンド入力後、USBケーブルを抜いてEnterキーを押します。
lerobot-find-portサーボドライバーのポート番号が表示されるのでメモします。
Finding all available ports for the MotorBus.
['/dev/tty.usbmodem5AAF2638821']
Remove the USB cable from your MotorsBus and press Enter when done.
The port of this MotorsBus is '/dev/tty.usbmodem5AAF2638821'
Reconnect the USB cable.(3) モーターのセットアップ。
以下のコマンドを入力します。
サーボドライバーとモーターを1つ、6/5/4/3/2/1/9/8/7の順に接続してはEnterを繰り返します。モーターにIDが書き込まれ、モーター位置が初期化されます。
lerobot-setup-motors \
--robot.type=lekiwi \
--robot.port=/dev/tty.usbmodem5AAF2638821 Connect the controller board to the 'arm_gripper' motor only and press enter.
'arm_gripper' motor id set to 6
Connect the controller board to the 'arm_wrist_roll' motor only and press enter.
'arm_wrist_roll' motor id set to 5
Connect the controller board to the 'arm_wrist_flex' motor only and press enter.
'arm_wrist_flex' motor id set to 4
Connect the controller board to the 'arm_elbow_flex' motor only and press enter.
'arm_elbow_flex' motor id set to 3
Connect the controller board to the 'arm_shoulder_lift' motor only and press enter.
'arm_shoulder_lift' motor id set to 2
Connect the controller board to the 'arm_shoulder_pan' motor only and press enter.
'arm_shoulder_pan' motor id set to 1
Connect the controller board to the 'base_right_wheel' motor only and press enter.
'base_right_wheel' motor id set to 9
Connect the controller board to the 'base_back_wheel' motor only and press enter.
'base_back_wheel' motor id set to 8
Connect the controller board to the 'base_left_wheel' motor only and press enter.
'base_left_wheel' motor id set to 72-4. サーボドライバーとバッテリーパックと2ピン端子の設置
(1) サーボドライバーをベースプレートに設置


(2) 12Vのバッテリーパックから2分岐ケーブルで、サーボドライバーと2ピン端子 (5V & 12V) に接続。


2ピン端子 (5V & 12V)は、7.4Vロボットアームを使用する場合は、5V出力経由でサーボモーターボードに電源を供給します。12Vロボットアームを使用する場合は、DCパワースプリッターから直接サーボモーターボードに電源を供給します。

2-5. SO-Arm10x の設置
(1) サーボドライバーとモーター7、7と8、8と9をケーブルで接続。
サーボドライバー → 7 → 8 → 9

(2) SO-Arm10xのID=1のサーボワイヤーを、ID=9のサーボモーターに接続。
この時、トッププレートをはさんでください。



(3) SO-Arm10xを設置。
設置前に、SO-Arm10xの各サーボモーターのID設定を完了してください。



2-6. Raspberry Pi の設置
(1) ピン端子 (5V & 12V) とRaspberry PiをUSBケーブルで接続。
電源がつながります。



(2) サーボドライバーとRaspberry PiをUSBケーブルで接続。
ドライバーがつながります。


(3) 12本のM3×16ねじを使用して、Raspberry Piとトッププレートの残りの部分を固定。



(4) USBカメラを取り付ける



(5) サーボ制御ケーブルとUSBカメラの両方がRaspberry Piに接続されていることを確認。
組み立て後、Lekiwiは開発ボード (Raspberry Pi / Jetson) に接続する必要があります。リーダーアームはPCに接続する必要があります。
・Lekiwi (台車+フォロワーアーム) → Raspberry Pi / Jetson
・リーダーアーム → PC

関連
次回
以下のリンクから LeKiwi を日本からご購入いただけます。読者の皆さま限定で、$10割引のクーポンコードもご用意しました。ぜひご利用ください。
NPAKA10
10月中は送料無料キャンペーンもやってます。