Software Setup

From a blank SD card to a moving robot: 13 steps, about 3–4 hours.

Before you start

If you can copy a command into a terminal, you can finish this page.

Jetson already on JetPack 6.2.1 and reachable over SSH? Start at step 3.

Build and wire the robot first.

Every motor needs its ID, and both bus adapters must be plugged into the Jetson over USB. The Build Guide covers this.

Which robot are you setting up?

Full robot 2-bus

Two arms, head, wheel base, 17 motors.

  • /dev/xle_arms: left arm IDs 1–6, right arm 7–12
  • /dev/xle_head: head 1–2, wheels 3–5

Benchtop rig single-bus

One arm plus the head on a desk.

  • One adapter: head IDs 1–2 and one arm at IDs 7–12 on the same chain

Steps 1–9 are the same for both. Steps 10–12 say which one they apply to.

Opening a terminal

From step 3 on, run every command on the Jetson, in the project folder, with the environment active. Start each new terminal with these two lines:

Every new terminal starts this way
$ source ~/.venvs/xlerobot-pro/bin/activate
$ cd ~/xlerobot-pro

Your prompt shows (xlerobot-pro) when the environment is active.

Words you will see · 6 terms
Bus
One chain of motors sharing a single wire back to the computer. This robot has two.
Motor ID
A number stored inside each motor, so the computer can address it. Two motors with the same ID break the whole chain.
Calibration
A one-time recording of each joint's centre and end stops.
IK (inverse kinematics)
Working out the joint angles that put the gripper at a target point.
udev symlink
A permanent name for a USB device. Without one, Linux can rename your buses on every reboot.
venv
An isolated Python installation, so this project's packages cannot break anything else on the machine.

The roadmap

Work top to bottom, and fix any step that fails before moving on.

Phase A

Prepare the computer

  1. 1Flash JetPack 6.2.145–90 min
  2. 2Switch to SSH10 min
Phase B

Install the software

  1. 3Create the Python environment5 min
  2. 4Install PyTorch15 min
  3. 5Install XLeRobot-Pro30–45 min
  4. 6Verify the install5 min
Phase C

Connect the robot

  1. 7Name the buses10 min
  2. 8Confirm every motor answers10 min
  3. 9Calibrate20 min
Phase A

Prepare the computer

1

Flash JetPack 6.2.1

  • 45–90 minutes
  • Skip if your Jetson already runs JetPack 6.2.x
Use JetPack 6.2.x, not 7.x.

The software needs Ubuntu 22.04 / Python 3.10, and JetPack 7 ships a newer Ubuntu.

1a. Check the firmware version

  1. Attach a monitor and USB keyboard. The carrier has DisplayPort, not HDMI; you need it for first boot only.
  2. Power on and press Esc repeatedly at the NVIDIA splash.
  3. Read the version on the UEFI banner. 36.x or newer: go to 1b. 35.x or older: run the bridge below first.
Firmware 35.x or older: the two-stage bridge
  1. Boot a JetPack 5.1.3 card and finish Ubuntu setup.
  2. Connect to the internet.
  3. Reboot once to let the initial firmware update run.
  4. Install the QSPI updater:
QSPI firmware bridge
$ sudo apt update && sudo apt install nvidia-l4t-jetson-orin-nano-qspi-updater
Do not cut power while QSPI flashes after that reboot.

A half-written firmware bricks the module.

1b. Write the card

Download jp62-r1-orin-nano-sd-card-image.zip (Jetson Linux 36.4.4) from NVIDIA's JetPack 6.2.1 page and write it to the card with Balena Etcher. Etcher runs on macOS and Windows, so you don't need an Ubuntu computer or SDK Manager.

The microSD slot is on the module, not the carrier.

It is on the underside of the Orin module, contacts facing up. If the card springs back out, it is not seated.

1c. First boot

  • Complete the Ubuntu setup wizard.
  • When it asks for APP partition size, take the maximum.
  • Join Wi-Fi during the wizard; step 2 needs it.
Confirm the release
$ cat /etc/nv_tegra_release
Done when

That command prints R36, revision 4.4 or later, and the machine is on your Wi-Fi network.

If it fails · 2 boot-screen messages
  • UEFI Interactive Shell v2.2 — Shell> means no bootable card was found. Reseat the card, or confirm the firmware is 36.x.
  • Error: could not make network connection is not a network fault. It also means no bootable card was found, and it goes away once one is present.
2

Switch to SSH

  • 10 minutes

Work from your laptop so the Jetson's USB ports stay free for the robot. The bus adapters and camera need three of them (five with the optional wrist cameras).

On the Jetson, once
$ sudo apt install -y openssh-server
$ hostname -I
# note the first address it prints
From your laptop
$ ssh <user>@<jetson-ip>

Once SSH works, unplug the monitor and keyboard. A cable to your desk would stop the robot short or get pulled out.

Done when

You are logged into the Jetson from your laptop, and the monitor and keyboard are unplugged.

Phase B

Install the software

3

Create the Python environment

  • 5 minutes
Do not install into a conda environment.

Inside conda, the Jetson's PyTorch fails to import or silently loses the GPU. If conda activates in your shell, run conda deactivate first.

Build the environment
$ sudo apt install -y git python3.10-venv python3.10-dev
$ /usr/bin/python3.10 -m venv ~/.venvs/xlerobot-pro
$ source ~/.venvs/xlerobot-pro/bin/activate
$ pip install --upgrade pip
Clone the repository
$ git clone https://github.com/Minko82/xlerobot-pro.git ~/xlerobot-pro
$ cd ~/xlerobot-pro
Done when
  • Your prompt shows (xlerobot-pro).
  • python --version prints 3.10.x.
  • ~/xlerobot-pro exists and contains pyproject.toml.
4

Install PyTorch

  • 15 minutes
  • Jetson only: skip on a laptop

Do this before installing the project. The standard PyPI torch has no GPU support on the Jetson, so install NVIDIA's JetPack 6 build first.

PyTorch from the Jetson index
$ pip install torch torchvision \
    --index-url https://pypi.jetson-ai-lab.io/jp6/cu126
Check which version you got
$ python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
# want: 2.10.0 True   ·   bad: anything ending in +cpu, or False
Use --index-url exactly as written.

If pip can reach PyPI during the install, it picks the CPU-only build. The old .dev address of the index no longer works.

Done when

The check prints a version with no +cpu suffix, followed by True.

If it fails · 2 known causes
  • False with a clean version number Torch is probably installed inside conda. Deactivate conda and rebuild the venv from step 3.
  • +cpu in the version Pip reached PyPI. Uninstall torch and reinstall with --index-url only.
5

Install XLeRobot-Pro

  • 30–45 minutes

Two installs: first the robot software, then the camera and arm-planning (vision and IK) software.

Part 1: the robot stack
$ cd ~/xlerobot-pro
$ pip install -e ".[all]"
# equivalent to: make install
Part 2: the vision stack (Jetson)
$ grep -v '^open3d' requirements/requirements-vision.txt > /tmp/req-vision.txt
$ pip install -r /tmp/req-vision.txt --no-cache-dir

Part 2 leaves out open3d on purpose: it has no Jetson build, and nothing on this page needs it. On a laptop, install the full file with pip install -r requirements/requirements-vision.txt.

A full install uses about 50 GB.

On a 64 GB card, run pip cache purge afterwards. Never clear ~/.cache/huggingface/lerobot/ wholesale: it holds your calibrations.

Done when

Both installs finish without errors and python -c "import lerobot, xlerobot_pro" prints nothing at all. Silence is success.

6

Verify the install

  • 5 minutes
  • No motors, no camera, no risk

Check the software before you involve any hardware. These tests need no motors or camera.

Offline verification
$ make smoke
$ python tests/vision_offline_suite.py
Done when
  • make smoke reports 7 passed.
  • vision_offline_suite.py reports 49/49 passed, 0 failed.

If anything failed, stop here and fix it.

If it fails · 3 known causes
  • "6 passed, 1 skipped" Part 2 of step 5 did not install. Install requirements-vision.txt and re-run; you want all seven.
  • ModuleNotFoundError: lerobot The venv is not active, or step 5 did not finish. Re-run source ~/.venvs/xlerobot-pro/bin/activate, then pip install -e ".[all]".
  • Errors mentioning pin, pink, or quadprog The vision install is incomplete. Confirm python3.10-dev is installed and re-run part 2 of step 5.
Phase C

Connect the robot

7

Name the buses

  • 10 minutes

Plug both bus adapters directly into the Jetson, not through a hub, and power the motors.

7a. Serial permissions

Grant serial access
$ sudo usermod -aG dialout $USER
# log out and back in: the group does not apply to your current shell

7b. Give the buses permanent names

Linux names the two adapters /dev/ttyACM0 and /dev/ttyACM1 in an order that can change after a reboot or replug. A script gives them permanent names, /dev/xle_arms and /dev/xle_head, which every program in this project uses. If you have a 99-xlerobot.rules file from an older build, delete it first.

Identify the buses and install the rules
# see what it found first
$ python diagnostics/detect_buses.py

# happy with the result? write the rules (asks for sudo)
$ python diagnostics/detect_buses.py --write

$ sudo udevadm control --reload-rules && sudo udevadm trigger
# now unplug and replug BOTH adapters
$ ls -l /dev/xle_arms /dev/xle_head
Done when

ls -l /dev/xle_arms /dev/xle_head lists both symlinks, each pointing at a ttyACM device.

If it fails · 3 known causes
  • No /dev/ttyACM* devices at all This is a USB problem, not a motor problem. Try a new cable first, then a different port, and only then suspect the adapter. Never put a bus adapter behind a hub.
  • Devices exist but detect_buses.py finds no motors The adapters have logic power but the motors do not. See step 8.
  • Both ports answer the same ID range You have duplicate motor IDs across buses. Go back to Motor Configuration.
8

Confirm every motor answers

  • 10 minutes
  • Read-only: nothing moves

Before anything moves, check that all 17 motors answer.

Check both buses
$ python diagnostics/check_bus.py --motors arm
# right arm, IDs 7-12, on /dev/xle_arms

$ python diagnostics/check_bus.py --motors head
# head, IDs 1-2, on /dev/xle_head

Then scan each bus to list every motor on it. Run it once for /dev/xle_arms and once for /dev/xle_head:

Full bus scan
$ python -c "from lerobot.motors.feetech import FeetechMotorsBus; \
  print(FeetechMotorsBus.scan_port('/dev/xle_arms'))"
Done when
  • A scan of /dev/xle_arms lists IDs 1–12 with no gaps.
  • A scan of /dev/xle_head lists IDs 1–5 with no gaps.
  • Both check_bus.py runs print positions rather than errors.
If it fails · 3 known causes
  • Whole bus silent, but each motor works alone Duplicate IDs, almost every time. A right arm still set to IDs 1–6 duplicates the entire left arm. Fix it in Motor Configuration.
  • Scan returns fewer IDs than motors attached The missing number names the motor or cable at fault. Halve the chain and re-scan until you find it.
  • Motors answer but report load pinned at 1024 + Torque_Limit with current 0 The bus has logic power but no motor power. Check Present_Voltage: ~120–135 means 12 V (good), ~50 means the bus is on a 5 V rail. A 5 V USB bank will not drive these motors.
9

Calibrate

  • 20 minutes
Torque is released for the whole procedure.

Both arms go limp and will fall from a raised pose. Support them by hand before you start, and clear everything from underneath them.

9a. Run it

Run it
$ python scripts/calibrate_xlerobot.py

The script asks for four things, in this order:

  1. Move both arms to the middle of their range and press Enter.
  2. Move every arm joint through its full travel, all the way to each end stop, on both arms.
  3. Centre the head and press Enter.
  4. The wheels are handled automatically.

The result is saved to ~/.cache/huggingface/lerobot/calibration/robots/xlerobot_new_wiring/xlerobot.json.

9b. Check the result. Do not skip this.

Calibration can finish without errors and still be wrong. Open the file and check two things:

  • Only wrist roll reads 0–4095. On any other arm joint, that full range means the calibration wrapped, and the arm would drive into its hard stop.
  • Left and right match. A joint with a much narrower range than its mirror was not moved through its full travel.

A known-good run, for comparison:

Joint pairLeft spanRight spanRatio
shoulder_pan271527320.99
shoulder_lift241824330.99
elbow_flex221721970.99
wrist_flex235823350.99
gripper152614480.95
Done when
  • The calibration file exists at the path above.
  • No limited joint shows a 0–4095 range.
  • Mirrored joints agree within a few percent.
If it fails · 2 known causes
  • Bus drops mid-calibration, always at the same joint The cable is being tugged at the end of that joint's travel. Leave a loop of slack at that joint and run it again.
  • An arm falls when the script ends Torque was cut rather than eased off. Support the arms; see the notes in the repo's diagnostics/README.md.
Phase D

Make it move

10

First motion: the wheels

  • 5 minutes
  • Full robot only

Move the wheels first. It is the safest test: the arms are never commanded, so nothing can drop on your hand.

Clear a metre of floor.

The default run drives forward a few centimetres. Keep a hand near the power switch.

Base drive check
# slow walk of a few centimetres: start here
$ python diagnostics/base_drive_check.py --vx 0.05 --seconds 2

# rotate in place instead
$ python diagnostics/base_drive_check.py --omega 15 --seconds 2

The script refuses anything over 0.15 m/s, over 45 deg/s of turning, or longer than 10 s. It prints FATAL and exits without moving.

Done when
  • The base moves in the direction you commanded.
  • Odometry agrees with the commanded velocity.
  • The base stops, and stays stopped, when the script exits.
If it fails · 2 known causes
  • A wheel spins the wrong way Its motor ID does not match the position it is mounted in. IDs 3, 4, 5 map to left, back, right. Recheck against the wiring diagram.
  • A bus vanishes after the base drives A cable was tugged loose. Secure the leads before any further driving.
11

First motion: the arms

  • 15 minutes
  • Full robot and benchtop rig
The arms move under power.

Clear the area, keep your hands away from the arms, and keep a hand near the power switch. Even with the torque limits, an arm can hit hard enough to hurt.

Full robot: drive everything with an Xbox controller

This drives both arms, the head, and the base together. Use the _new_wiring script: the plain 5_xlerobot_teleop_xbox.py is for an older wiring and will not connect.

Whole-robot teleop
# confirm the controller is seen first
$ python examples/pygame_test.py

$ python examples/5_xlerobot_teleop_xbox_new_wiring.py

One arm with the keyboard

Check each motor with joint control first, then try end-effector control. Use the copies in examples/xlerobot_examples/: the files with the same names directly in examples/ use an older wiring and will not connect.

Single-arm bring-up
# joint-by-joint, no IK
$ python examples/xlerobot_examples/0_so100_keyboard_joint_control.py

# end-effector control
$ python examples/xlerobot_examples/1_so100_keyboard_ee_control.py

# both ask for a port. Full robot: /dev/xle_arms
# Benchtop rig:  /dev/ttyACM0  (or press Enter for that default)
# then answer "n" to "recalibrate?": you already did that in step 9
These scripts drive one arm, at motor IDs 1–6.

On the full robot, that is the left arm. For both arms, use the Xbox teleop above. The First Reach Tutorial walks through the end-effector script.

Cameras

Verify the camera streams
$ v4l2-ctl --list-devices
$ python examples/9_dual_wrist_camera.py
# RealSense head camera
$ rs-enumerate-devices
Done when
  • Every arm joint moves, and moves in the direction you expect.
  • The head tilts and pans.
  • All three camera streams open.
If it fails · 3 known causes
  • Arm jerks or moves wildly Almost always a motor ID mismatch or a reversed servo horn. Recheck Motor Configuration.
  • Arm drops when a script ends Torque was cut rather than eased off. Never call disable_torque on a loaded arm; step Torque_Limit down over several seconds instead.
  • RealSense frames time out Replug the USB 3.0 cable and re-run rs-enumerate-devices.
12

Color-target grasp demo

  • 20 minutes
  • Benchtop rig

The camera finds a coloured cube, and the arm reaches for it, grasps it, lifts it, and lets go.

This demo is written for the single-bus benchtop rig.

On the full robot it reads the left arm's shoulder as the head and aims at the wrong place. Run it on a single-bus rig, or set XLEROBOT_BUS_PORT to a bus that matches its motor map.

Color-target grasp demo
$ cd ~/xlerobot-pro
# on a single-bus rig, point it at that adapter
$ export XLEROBOT_BUS_PORT=/dev/ttyACM0
$ python examples/vision/grab_cube.py

What you should see:

  1. Calibration loads, head angles print, and the motor limits are applied.
  2. The camera captures and finds a red blob.
  3. The arm reaches, grasps, lifts, and releases.
Check the head motors first.

ID 1 should tilt the head up and down, and ID 2 should pan it left and right. If they are swapped, the arm goes to the wrong place.

No camera? Run the scripted motions

These move the arm without a camera. They use /dev/ttyACM0 and the default SO-101 IDs 1–6; edit the port at the top of the file to match your rig.

Scripted motions (no camera)
$ python examples/vision/scripted/so101_simple.py
$ python examples/vision/scripted/so101_reach_forward.py
# also: so101_pen_pickup, so101_pen_drop, so101_grab_cube,
#       so101_grab_apple, so101_hang
Done when

The arm reaches the cube, closes the gripper on it, lifts it, and releases.

If the grasp misses · 3 tools to find out why

If the gripper misses by more than a couple of centimeters, check the assembly first. Then:

  • Is the camera finding the cube? diagnostics/visualize_color_detect.py draws the detection on the last capture.
  • Is the position right? diagnostics/check_vision_live.py compares the camera detection with the arm's coordinates, live.
  • Is the arm where it thinks it is? diagnostics/diagnose_fk_vs_vision.py: place the gripper on the target by hand, then compare.
13

Safety limits and Jetson tuning

  • 10 minutes

The motor limits live in one file

Maximum torque, acceleration, and speed are all set in src/xlerobot_pro/firmware_limits.py, and applied automatically when the robot connects.

BusTorque limitAccelerationPower
Bus 1: arms4504012 V car outlet
Bus 2: head and wheels65020USB-C outlet

To change a limit, edit that file, never the demo scripts. Then check what the motors stored:

Verify the limits took
$ python diagnostics/verify_motor_limits.py

Jetson tuning

GoalCommand
Confirm GPU PyTorch is livepython -c "import torch; print(torch.cuda.is_available())" prints True
Highest power mode (MAXN SUPER)sudo nvpmodel -m 2
Pin the GPU clockssudo jetson_clocks
Fix open3d OpenMP errorsexport LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

MAXN SUPER runs fine on the robot's battery. On the Orin Nano Super, mode 0 is 15 W and mode 1 (25 W) is the default.

What to try next

  • Reach by coordinates with the First Reach Tutorial.
  • Drive both arms from a VR headset with examples/teleop_hand_and_arm.py --arm SO101. It builds on Unitree's TeleVuer and teleimager packages, and the headset is not in the parts list.
  • Record a dataset with lerobot-record while you teleoperate.
  • Train a policy with lerobot-train on the Jetson, then run it with examples/policies/act_policy_control.py. The README lists the settings.
  • Something broke? Troubleshooting lists failures by symptom.
Back to top