Skip to content

How-ToGPU

How to Train an AI Robot Arm on Your Own PC with LeRobot and the SO-101

Hugging Face's free LeRobot library lets you teach a low-cost SO-101 robot arm a task by demonstration, then train an AI policy on your own GPU. Following the official docs, we cover the hardware, installing LeRobot, setting up and calibrating the arms, recording a dataset, training ACT and running it.

By , Systems & Technical Editor

4 min read

How to Train an AI Robot Arm on Your Own PC with LeRobot and the SO-101

Hugging Face's LeRobot is a free, open-source Python library that lets you teach a low-cost robot arm a task by showing it what to do, then training a neural network on your own graphics card to repeat it. The usual starter hardware is the SO-101, an open-source arm you can 3D print and build yourself or buy as a kit.

What you need

  • Two SO-101 arms: a follower arm that does the work and a leader arm that you move by hand to teleoperate it. Both use Feetech STS3215 servo motors. The follower uses six STS3215 motors with 1/345 gearing, while the leader mixes 1/191, 1/345 and 1/147 gearing so it can hold its own weight but still moves easily by hand.

  • Parts or a kit: the SO-101 repository has a bill of materials and 3D printing instructions, and lists vendors selling parts kits, printed kits and assembled arms. It says prices and items vary by region.

  • Power: the standard 7.4V follower motors run from a 5V supply. The repository says a 12V version of the motor has more torque (30 kg.cm versus 16.5 kg.cm at 6V for the 7.4V motor) but needs a 12V 5A or higher power supply instead. The leader arm always uses the 7.4V motors.

  • One or more cameras: LeRobot records camera video alongside the arm's joint positions. Its cameras guide lists USB webcams, phones and built-in laptop cameras (through OpenCV) and Intel RealSense depth cameras among the supported options, so a standard USB webcam such as the Logitech Brio is enough to start; see our best webcams guide.

  • A PC with a GPU for training: training runs locally by default on an NVIDIA GPU with CUDA, such as a GeForce RTX 5060, or on Apple silicon, and the docs offer Google Colab and paid Hugging Face Jobs if your computer isn't powerful enough.

Step 1: Install LeRobot

The installation guide asks for Python 3.12 in a conda or uv virtual environment, plus ffmpeg for video decoding. With conda, that's:

conda create -y -n lerobot python=3.12
conda activate lerobot
pip install 'lerobot[feetech]'

The feetech extra installs the SDK for the SO-101's motors. The docs include Linux and macOS instructions and notes for installing inside WSL on Windows; our guide to setting up WSL2 for GPU local AI covers the Windows side. LeRobot stores datasets and models in the Hugging Face cache, which you can move to another drive if your system drive is small.

Step 2: Set up the motors

Each arm connects to the PC through its own USB motor controller board. Run lerobot-find-port and unplug the board when prompted, so LeRobot can tell you which port belongs to which arm. Then run lerobot-setup-motors for each arm, which gives every motor its ID as you connect them one at a time.

Step 3: Calibrate both arms

Run lerobot-calibrate for the follower and then the leader. The SO-101 guide says calibration makes sure the leader and follower report the same position values when they're in the same physical position, and that it is "very important because it allows a neural network trained on one robot to work on another."

Step 4: Teleoperate and add cameras

lerobot-teleoperate, with --robot.type=so101_follower and --teleop.type=so101_leader, lets you move the leader arm and watch the follower copy it. Run lerobot-find-cameras to list your cameras, then add them with the --robot.cameras option. The docs warn that a policy trained on a dataset expects the same camera names and resolution when you deploy it, so settle on a camera setup before recording.

Step 5: Record a dataset

Log in to the Hugging Face Hub with a write-access token (hf auth login), then use lerobot-record to record episodes: each one is a single attempt at the task, performed through the leader arm. The docs suggest starting with a simple task such as picking up an object from different locations and placing it in a bin, and recording at least 50 episodes, 10 per location. They also advise keeping the cameras fixed, grasping consistently and making sure the object is visible, with the rule of thumb that you should be able to do the task yourself by only looking at the camera images. lerobot-replay plays back an episode on the arm so you can check it.

Step 6: Train a policy on your GPU

LeRobot's docs recommend ACT (Action Chunking with Transformers) as the first policy to try, describing it as having about 80 million parameters and training in a few hours on a single GPU. Run lerobot-train with your dataset, --policy.type=act and --policy.device=cuda (or mps on Apple silicon). The imitation learning guide says training should take several hours, runs 100,000 steps by default, and that imitation learning typically converges within 5 to 10 epochs over the data, so a small dataset may not need the full default run. Checkpoints are saved in the outputs folder and can be uploaded to the Hub.

Step 7: Run the trained policy

Once training finishes, lerobot-rollout loads the trained policy and lets the follower arm attempt the task on its own, with options for different deployment strategies. The docs suggest that once grasping is reliable, you add more variation to your data, such as new grasp locations, techniques and camera positions.

The bottom line

LeRobot and an SO-101 arm are the most documented way to try AI robotics at home: install LeRobot with Python 3.12, calibrate a leader and follower arm, record around 50 teleoperated episodes with fixed cameras, and train an ACT policy on an NVIDIA GPU or Apple silicon Mac in a few hours. Forge PC hasn't tested it, so treat the official LeRobot docs as the reference.

In this article

Sources

  1. 01LeRobot documentation: SO-101
  2. 02LeRobot documentation: Installation
  3. 03LeRobot documentation: Imitation learning on real-world robots
  4. 04LeRobot documentation: ACT
  5. 05LeRobot documentation: Cameras
  6. 06SO-ARM100/SO-101 repository (TheRobotStudio, GitHub)
  7. 07LeRobot repository (Hugging Face, GitHub)

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

How to Add an Exclusion to Microsoft Defender in Windows 11 (Safely)

How-To

How to Add an Exclusion to Microsoft Defender in Windows 11 (Safely)

Microsoft Defender keeps flagging a file you trust? Rather than switching protection off, you can exclude a file, folder, file type or process in Windows Security. Following Microsoft's guidance, we show how to add and remove exclusions, use wildcards safely and what exclusions don't cover.

Marcus Thorne4 min