2. LeRobot Setting
last updated Dec/26/2025
2-1. USB port ์ฐพ๊ธฐ
- Follower arm ๋ณด๋์ PC๋ฅผ USB๋ก ์ฐ๊ฒฐ
- ์๋ ๋ช ๋ น ์คํ
lerobot-find-port
- ์๋ด์ ๋ฐ๋ผ Follower arm ๋ณด๋์์ USB ์ผ์ด๋ธ์ ๋ฝ๊ณ Enter๋ฅผ ๋๋ฅด๋ฉด, ์๋์ ๊ฐ์ ๊ฒฐ๊ณผ๊ฐ ์ถ๋ ฅ๋ฉ๋๋ค.
The port of this MotorsBus is '/dev/ttyACM0'
Reconnect the USB cable
โ ์ด ๊ฒฝ์ฐ์ follower arm ๋ณด๋์ USB ํฌํธ๋ /dev/ttyACM0 ์
๋๋ค.
Leader arm ๋ณด๋๋ ๋ง์ฐฌ๊ฐ์ง๋ก USB ํฌํธ๋ฅผ ์ฐพ์์ค๋๋ค.
๊ฐ ํฌํธ๊ฐ ์ด๋ค arm(Follower/Leader)์ ํด๋นํ๋์ง ๋ฐ๋์ ๊ตฌ๋ถํด ๋์ธ์.
์ฐ๊ฒฐ๋ USB ํฌํธ์ Read/Write ๊ถํ ๋ถ์ฌ
sudo chmod 666 /dev/ttyACM0
sudo chmod 666 /dev/ttyACM1
(Optional) Serial number๋ฅผ ๊ธฐ๋ฐ์ผ๋ก USB port ๊ณ ์ ํ๋ ๋ฒ
1. ttyACM0 serial ํ์ธ
udevadm info -a -n /dev/ttyACM0 | grep '{serial}' -m 1
# Example print
ATTRS{serial}=="5A7A057786"
2. ttyACM1 serial ํ์ธ
udevadm info -a -n /dev/ttyACM1 | grep '{serial}' -m 1
# Example print
ATTRS{serial}=="5A68011549"
3. udev rule ์์ฑ
# udev rule ์์ฑ/ํธ์ง
sudo nano /etc/udev/rules.d/99-serial.rules
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
sudo udevadm control --reload-rules
sudo udevadm trigger
5. ๊ณ ์ ํฌํธ ํ์ธ
ls -l /dev/so101_*
# 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
lerobot-setup-motors \
--robot.type=so101_follower \
--robot.port=/dev/so101_follower # Follower ๋ณด๋์ USB port
Leader
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
lerobot-calibrate \
--robot.type=so101_follower \
--robot.port=/dev/so101_follower \
--robot.id=follower
Leader
lerobot-calibrate \
--teleop.type=so101_leader \
--teleop.port=/dev/so101_leader \
--teleop.id=leader
Calibration ๊ณผ์
Command ์คํ ํ ๋ค์๊ณผ ๊ฐ์ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค.
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์ด ์๋ฃ๋๋ฉด ๋ค์๊ณผ ๊ฐ์ ๊ด์ ์์น ์ ๋ณด๊ฐ ์ถ๋ ฅ๋ฉ๋๋ค(์์).
-------------------------------------------
-------------------------------------------
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
ํ์ผ ์ ์ฅ ํ์ธ
์ฑ๊ณต์ ์ผ๋ก ์๋ฃ๋๋ฉด ๋ค์ ๋ฉ์์ง๊ฐ ํ์๋ฉ๋๋ค.
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)