| # 2. LeRobot Setting |
| last updated Dec/26/2025 |
|
|
| ## 2-1. USB port μ°ΎκΈ° |
|
|
| 1) Follower arm 보λμ PCλ₯Ό USBλ‘ μ°κ²° |
| 2) μλ λͺ
λ Ή μ€ν |
|
|
| ```bash |
| lerobot-find-port |
| ``` |
|
|
| 3) μλ΄μ λ°λΌ **Follower arm 보λμμ USB μΌμ΄λΈμ λ½κ³ Enter**λ₯Ό λλ₯΄λ©΄, μλμ κ°μ κ²°κ³Όκ° μΆλ ₯λ©λλ€. |
|
|
| ```text |
| The port of this MotorsBus is '/dev/ttyACM0' |
| Reconnect the USB cable |
| ``` |
|
|
| β μ΄ κ²½μ°μ follower arm 보λμ USB ν¬νΈλ **`/dev/ttyACM0`** μ
λλ€. |
|
|
| 4) Leader arm 보λλ λ§μ°¬κ°μ§λ‘ USB ν¬νΈλ₯Ό μ°Ύμμ€λλ€. |
|
|
| 5) κ° ν¬νΈκ° μ΄λ€ arm(Follower/Leader)μ ν΄λΉνλμ§ **λ°λμ ꡬλΆ**ν΄ λμΈμ. |
|
|
| 6) μ°κ²°λ USB ν¬νΈμ Read/Write κΆν λΆμ¬ |
| ```bash |
| sudo chmod 666 /dev/ttyACM0 |
| sudo chmod 666 /dev/ttyACM1 |
| ``` |
|
|
| ## (Optional) Serial numberλ₯Ό κΈ°λ°μΌλ‘ USB port κ³ μ νλ λ² |
|
|
| ### 1. ttyACM0 serial νμΈ |
| ```bash |
| udevadm info -a -n /dev/ttyACM0 | grep '{serial}' -m 1 |
| ``` |
|
|
| ```bash |
| # Example print |
| ATTRS{serial}=="5A7A057786" |
| ``` |
|
|
| ### 2. ttyACM1 serial νμΈ |
| ```bash |
| udevadm info -a -n /dev/ttyACM1 | grep '{serial}' -m 1 |
| ``` |
|
|
| ```bash |
| # Example print |
| ATTRS{serial}=="5A68011549" |
| ``` |
|
|
| ### 3. udev rule μμ± |
|
|
| ```bash |
| # udev rule μμ±/νΈμ§ |
| sudo nano /etc/udev/rules.d/99-serial.rules |
| ``` |
|
|
| ```bash |
| GNU nano 2.9.3 /etc/udev/rules.d/99-serial.rules |
| |
| # μλμ serial numberλ μμμ
λλ€. μμ μ νκ²½μμ νμΈν κ°μΌλ‘ λ°λμ κ΅μ²΄νμΈμ. |
| SUBSYSTEM=="tty", ATTRS{serial}=="5A7A057786", SYMLINK+="so101_follower" |
| SUBSYSTEM=="tty", ATTRS{serial}=="5A68011549", SYMLINK+="so101_leader" |
| ``` |
|
|
| ### 4. rule reload / trigger |
| ```bash |
| sudo udevadm control --reload-rules |
| sudo udevadm trigger |
| ``` |
|
|
| ### 5. κ³ μ ν¬νΈ νμΈ |
| ```bash |
| ls -l /dev/so101_* |
| ``` |
|
|
| ```bash |
| # Example print |
| # USB ν¬νΈλ₯Ό κ½λ μμκ° λ°λμ΄λ λ€μ κ²½λ‘λ‘ νμ λμΌνκ² μΈμ |
| lrwxrwxrwx 1 root root 7 11μ 24 21:46 /dev/so101_follower -> ttyACM0 |
| lrwxrwxrwx 1 root root 7 11μ 24 21:46 /dev/so101_leader -> ttyACM1 |
| ``` |
|
|
| --- |
|
|
| ## 2-2. λͺ¨ν° ID μ€μ |
|
|
| - κ° λͺ¨ν°μ **κ³ μ ID** μ€μ μ μν΄ μλ λͺ
λ Ήμ΄ μ€ν ν, ν°λ―Έλμ νμλλ κ°μ΄λμ λ°λΌ **λͺ¨ν°λ₯Ό μμλλ‘ μ°κ²°**νλ©° μ§ν |
| - μλ λ§ν¬μ μμμ 보면μ νλ κ±Έ μΆμ²ν©λλ€. \ |
| https://huggingface.co/docs/lerobot/so101#2-set-the-motors-ids-and-baudrates |
|
|
| ### Follower |
| ```bash |
| lerobot-setup-motors \ |
| --robot.type=so101_follower \ |
| --robot.port=/dev/so101_follower # Follower 보λμ USB port |
| ``` |
|
|
| ### Leader |
| ```bash |
| lerobot-setup-motors \ |
| --teleop.type=so101_leader \ |
| --teleop.port=/dev/so101_leader # Leader 보λμ USB port |
| ``` |
|
|
| --- |
|
|
| ## 2-3. Calibration |
|
|
| - Calibrationμ λ‘λ΄ νμ κ° κ΄μ (joint)μ΄ μ νν μμΉλ₯Ό μΈμνκ³ λ§€νν μ μλλ‘ νλ μ€μν κ³Όμ μ
λλ€. |
| - μλ λ§ν¬μ μμμ 보면μ νλ κ±Έ μΆμ²ν©λλ€. \ |
| https://huggingface.co/docs/lerobot/so101#calibrate |
|
|
| ### Follower |
| ```bash |
| lerobot-calibrate \ |
| --robot.type=so101_follower \ |
| --robot.port=/dev/so101_follower \ |
| --robot.id=follower |
| ``` |
|
|
| ### Leader |
| ```bash |
| lerobot-calibrate \ |
| --teleop.type=so101_leader \ |
| --teleop.port=/dev/so101_leader \ |
| --teleop.id=leader |
| ``` |
|
|
| ### Calibration κ³Όμ |
| Command μ€ν ν λ€μκ³Ό κ°μ λ©μμ§κ° νμλ©λλ€. |
|
|
| ```text |
| Move None SO101Leader to the middle of its range of motion and press ENTER.... |
| Move all joints sequentially through their entire ranges of motion. |
| Recording positions. Press ENTER to stop... |
| ``` |
|
|
| μ λ©μμ§λ₯Ό λ°λΌ **μ€κ° μμΉ(middle position)** λ₯Ό μ‘μμ£Όκ³ **Enter**λ₯Ό λλ¬μ£ΌμΈμ. |
|
|
| #### Joint μμ§μ 체ν¬λ¦¬μ€νΈ |
| - λ‘λ΄ νμ **μ€κ° μμΉ(middle position)** λ‘ μ΄λ |
| - λͺ¨λ κ΄μ (joints)μ **μμ°¨μ μΌλ‘** μ 체 λ²μμμ μμ§μ¬λ³΄κΈ° |
| - **ENTER** ν€λ₯Ό λλ¬ κΈ°λ‘ μ€μ§ |
|
|
| ### Calibration κ²°κ³Ό |
| Calibrationμ΄ μλ£λλ©΄ λ€μκ³Ό κ°μ κ΄μ μμΉ μ λ³΄κ° μΆλ ₯λ©λλ€(μμ). |
|
|
| ```bash |
| ------------------------------------------- |
| ------------------------------------------- |
| NAME | MIN | POS | MAX |
| shoulder_pan | 1955 | 2007 | 3132 |
| shoulder_lift | 709 | 724 | 2057 |
| elbow_flex | 1605 | 3036 | 3110 |
| wrist_flex | 808 | 2797 | 2803 |
| wrist_roll | 2037 | 2048 | 2055 |
| gripper | 2019 | 2046 | 3383 |
| ``` |
| |
| ### νμΌ μ μ₯ νμΈ |
| μ±κ³΅μ μΌλ‘ μλ£λλ©΄ λ€μ λ©μμ§κ° νμλ©λλ€. |
| |
| ```bash |
| Calibration saved to ~/.cache/huggingface/lerobot/calibration/teleoperators/so101_leader/leader.json |
| ``` |
| |
| ### Calibration νμΌ |
| |
| Calibrationμ΄ μλ£λλ©΄ λ€μ μμΉμ νμΌμ΄ μ μ₯λ©λλ€. |
| |
| - 리λ μ: |
| `~/.cache/huggingface/lerobot/calibration/teleoperators/so101_leader/leader.json` |
| - νλ‘μ μ: |
| `~/.cache/huggingface/lerobot/calibration/robots/so101_follower/follower.json` |
| |
| |
| κ° Calibration νμΌμλ λ€μ μ λ³΄κ° ν¬ν¨λ©λλ€. |
| |
| - κ° κ΄μ μ μ΅μκ°(MIN) |
| - νμ¬ μμΉ(POS) |
| - μ΅λκ°(MAX) |
| |
| --- |
| |