Workshop 1: Robot Setup & Control

From Box to Action

What We'll Cover Today

Your Most Important Tab

This is your single source of truth. Keep it open.

https://huggingface.co/docs/lerobot/index

Step 1: Finding Your Robot's Port

Goal: Identify the unique USB port for *each* arm.

python lerobot/find_port.py

The Process (It's Interactive!):

  1. The script lists all connected serial ports.
  2. It asks you to unplug one arm and press Enter.
  3. The script identifies which port disappeared. That's the port for that arm!
  4. Reconnect the arm and repeat for the other one.

What is Calibration?

It teaches the software the physical limits and properties of your specific robot arms.

CRUCIAL: Without calibration, movements will be inaccurate, unpredictable, and potentially unsafe.

Calibrating the Follower Arm (The Robot)

python -m lerobot.calibrate \
       --robot.type=so101_follower \
       --robot.port=YOUR_FOLLOWER_PORT \
       --robot.id='your-robot-name'
  • --robot.type: Specifies the kind of robot.
  • --robot.port: The port you just found.
  • --robot.id: A unique name to save the calibration file.

Calibrating the Leader Arm (The Controller)

python -m lerobot.calibrate \
       --teleop.type=so101_leader \
       --teleop.port=YOUR_LEADER_PORT \
       --teleop.id='your-controller-name'
  • --teleop: This prefix signifies this is the teleoperation/controller device.

Step 3: Taking Direct Control

This is how you'll record data for imitation learning.

For more details, see the 'Imitation Learning for Robots' tutorial in the docs.

The Teleoperation Command

python -m lerobot.teleoperate \
       --robot.type=so101_follower \
       --robot.port=YOUR_FOLLOWER_PORT \
       --robot.id=your-robot-name \
       --teleop.type=so101_leader \
       --teleop.port=YOUR_LEADER_PORT \
       --teleop.id=your-controller-name

Note how we use the unique `id`s we chose during calibration.

Live Demo Time!

Let's run through `find_port`, `calibrate`, and `teleoperate` live.

Quick Troubleshooting

  • "Can't find port?" → Make sure the robot is plugged in and turned on. Run `find_port.py` again.
  • "Calibration fails?" → Check your IDs and ports. Ensure the robot has clear space to move.
  • "Movement is jerky?" → You might need to re-calibrate. Follow all on-screen steps carefully.

Your Turn!

Find your ports, calibrate your arms, and try teleoperation. Mentors are here to help.