---
# System prepended metadata

title: Perfect LeRobot Setup on NVIDIA Jetson AGX Thor
tags: [thor, lerobot]

---

# Perfect LeRobot Setup on NVIDIA Jetson AGX Thor

The first thing is flash the Thor to the latest firmware and OS 
https://docs.nvidia.com/jetson/agx-thor-devkit/user-guide/latest/quick_start.html

ISO used:
https://developer.nvidia.com/downloads/embedded/L4T/r38_Release_v2.0/release/jetsoninstaller-0.2.0-r38.2-2025-08-22-01-33-29-arm64.iso

{%youtube EgMsdcW2A94 %}

# Step Steps and Hints

Install the packages

```
sudo apt-get update 
sudo apt-get full-upgrade
#reboot here!! Do not skip this step

sudo apt-get install build-essential python3-pip python3-venv


#gucview for webcam
sudo apt-get install guvcview


#install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

#restart your terminal 

```

If type c port isn't working, swap them. Mine the right port only works with power, but no data for example.


# Installation

```
#Note: our home directory for all the work below is /home/nvidia/robotic
#mkdir -p /home/nvidia/robotic
#cd /home/nvidia/robotic


uv venv venv
source venv/bin/activate

git clone https://github.com/huggingface/lerobot.git
cd lerobot

uv pip install -e ".[feetech]"
```

# Calibration

NOTE: override permission here before you use the port or setup with these steps

```
sudo chmod 666 /dev/ttyACM0
sudo chmod 666 /dev/ttyACM1
```

```
The easy way:
## https://askubuntu.com/questions/112568/how-do-i-allow-a-non-default-user-to-use-serial-device-ttyusb0

sudoedit /etc/udev/rules.d/50-myusb.rules

## Save this text:

KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"

```


Swap ttyAMC0 and ttyACM1 as needed
```
lerobot-calibrate --teleop.type=so101_leader --teleop.port='/dev/ttyACM0' --teleop.id=ray_leader
lerobot-calibrate --robot.type=so101_follower --robot.port='/dev/ttyACM1' --robot.id=ray_arm
```

# Teleoperate it
```
lerobot-teleoperate --robot.type=so101_follower --robot.id=ray_arm --robot.port='/dev/ttyACM1' --teleop.type=so101_leader --teleop.port='/dev/ttyACM0' --teleop.id=ray_leader --display_data=true
```

## Use Camera
```
#https://github.com/huggingface/lerobot/issues/1675

lerobot-teleoperate --robot.type=so101_follower --robot.id=ray_arm --robot.port='/dev/ttyACM1' --teleop.type=so101_leader --teleop.port='/dev/ttyACM0' --teleop.id=ray_leader --display_data=true --robot.cameras="{wrist.right: {type: opencv, index_or_path: 0, width: 1920, height: 1080, fps: 30, fourcc: 'MJPG'}}"

```

## One Click Script

Teleoperate it with another arm (remember to switch `ttyACM0` and `ttyACM1` as needed).
```
cd /home/nvidia/robotic
source venv_robotics/bin/activate
lerobot-teleoperate --robot.type=so101_follower --robot.id=ray_arm --robot.port='/dev/ttyACM1' --teleop.type=so101_leader --teleop.port='/dev/ttyACM0' --teleop.id=ray_leader --display_data=true --display_data=true --robot.cameras="{wrist.right: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: 'MJPG'}}"
```

Record a quick session, this may throw (harmless) error about repos not found because we didn't setup huggingface repos for upload. Check here on how to add your token and setup huggingface repos.
https://huggingface.co/docs/lerobot/en/getting_started_real_world_robot#record-a-dataset

```
#remove older ones or rename before we capture
#rm -rf ~/.cache/huggingface/lerobot/ray
cd /home/nvidia/robotic
source venv_robotics/bin/activate

lerobot-record --robot.type=so101_follower --robot.id=ray_arm --robot.port='/dev/ttyACM1' --teleop.type=so101_leader --teleop.port='/dev/ttyACM0' --teleop.id=ray_leader --display_data=true --display_data=true --robot.cameras="{wrist.right: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30, fourcc: 'MJPG'}}" --dataset.repo_id="ray/test_pickup" --dataset.num_episodes=2 --dataset.single_task="pickup"

echo "find dataset here: ~/.cache/huggingface/lerobot/"

```

Replay a quick session, so the robot will repeat your actions
```
cd /home/nvidia/robotic
source venv_robotics/bin/activate
lerobot-replay \
    --robot.type=so101_follower \
    --robot.port=/dev/ttyACM1 \
    --robot.id=ray_arm \
    --dataset.repo_id="ray/test_pickup" \
    --dataset.episode=0

```

Visualize the dataset 
```
cd /home/nvidia/robotic
source venv_robotics/bin/activate
lerobot-dataset-viz  --repo-id="ray/test_pickup" --episode-index 0
```

Download the scripts here
https://drive.google.com/drive/folders/1BhWhZQ_vkdPCezXPqxDiyifQEpxn3m6S?usp=sharing

# References:
https://huggingface.co/docs/lerobot/en/getting_started_real_world_robot
https://wiki.seeedstudio.com/lerobot_so100m/


# Known Issues:

https://forums.developer.nvidia.com/t/thor-input-lags-and-may-miss-characters/345048/13

Workaround now is to run in another terminal and let it be:
```
nvidia-smi dmon
```
