All posts

so-101lerobotdeploymentreinforcement learning November 10, 2026 4 min read

Teach your SO-101 a skill without recording demonstrations

Most SO-101 owners teach the arm by recording demonstrations. kualia takes a different route: describe the skill in a sentence, train a reinforcement-learning policy in simulation, and run the ONNX file on the real arm — including an arm you already set up with LeRobot.

By kualia team

The SO-101 is the most popular low-cost robot arm of the moment, and the usual way to teach it something is imitation learning: you move a leader arm through the task dozens of times, record the episodes, train on a GPU, and hope the policy generalises beyond the demonstrations you gave it. Hugging Face's LeRobot library made that workflow accessible, and many SO-101 owners started there.

kualia teaches the same arm a different way. You describe the skill in a sentence. kualia writes the reinforcement-learning task, checks it, trains the policy in MuJoCo on its own servers, and gives you an ONNX file for the real arm. No leader arm, no recorded episodes, no GPU of your own, no RL code.

Demonstrations or a goal?

Imitation learning (record demonstrations) kualia (reinforcement learning from a sentence)
What you provide Dozens of teleoperated demonstrations One sentence; optionally how success is measured
Hardware needed to start The arm, a leader arm, a GPU for training A browser — try it in simulation before the arm arrives
What the policy learns To copy what you did To reach a measurable goal, often more precisely or faster than a human demo
Changing the skill Record again Ask alia to change the task, retrain, compare versions
Robustness Limited to what the demos covered Trained across randomised starts and object positions
Output A policy tied to its training stack One deterministic ONNX file with normalisation built in

Imitation learning shines when a skill is easy to show and hard to describe. A reward-driven policy is the better tool when the goal is measurable — reach the target precisely, press the button with the right travel, keep the cup level — or when you simply do not want to spend an afternoon recording episodes.

Step 1: train the skill in kualia

  1. Open the SO-101 page and start a project, or pick the SO-101 in the Studio.
  2. Describe the skill: "move the gripper to the red target", "press the button on the table", "push the box to the line". If the skill is ambitious ("pick up the box and stack it"), alia builds its first milestone and tells you the next one.
  3. alia writes the task — observations, reward, success and failure, objects in the world — and runs 13 automatic checks before a single step trains.
  4. Start a first practice run and watch the arm learn in 3D in your browser. The results show how far it got compared with where it started, and you keep practising from there.
  5. Run the exact exported policy live in the browser simulator, then open Export and download the ONNX file.

Step 2: run it on the real arm

The ONNX policy needs two things on the robot: the arm's joint readings in, and joint targets out, at the task's control rate (50 Hz by default). Any motor driver that can do that works — the ONNX deployment guide shows the general recipe.

If your SO-101 is already set up with LeRobot, you do not need anything new: kualia's SO-101 model uses the same joint names in the same order — shoulder_pan, shoulder_lift, elbow_flex, wrist_flex, wrist_roll, gripper — so its follower driver can carry kualia's policy directly. Calibrate the arm as you normally would:

pip install 'lerobot[feetech]' onnxruntime numpy
lerobot-calibrate --robot.type=so101_follower --robot.port=/dev/ttyACM0 --robot.id=my_follower

Two unit conversions:

  • Arm joints. kualia's policy works in radians; create the follower with use_degrees=True and convert.
  • Gripper. The driver reports the gripper as 0–100 % of its calibrated range; in kualia's model it is a joint from about −10° to 100°. Map one onto the other linearly and check it on the real gripper.

The control loop

import json, time
import numpy as np
import onnxruntime as ort
from lerobot.robots.so_follower import SO101Follower, SO101FollowerConfig

JOINTS = ["shoulder_pan", "shoulder_lift", "elbow_flex", "wrist_flex", "wrist_roll", "gripper"]

# The kualia policy: one file, observation normalisation built in.
sess = ort.InferenceSession("reach_the_target_run12_PPO.onnx", providers=["CPUExecutionProvider"])
meta = {k: json.loads(v) for k, v in sess.get_modelmeta().custom_metadata_map.items()}
obs_dim = meta["input"]["shape"][1]
ctrl_low = np.array(meta["browser_sim"]["recipe"]["ctrl"]["low"])    # radians, the actuators' ranges
ctrl_high = np.array(meta["browser_sim"]["recipe"]["ctrl"]["high"])

# max_relative_target clips every goal to within N degrees of the current position.
robot = SO101Follower(SO101FollowerConfig(port="/dev/ttyACM0", id="my_follower", use_degrees=True, max_relative_target=5.0))
robot.connect()

HZ = 50                                   # the task's control rate, shown on the Export page
G_LO, G_HI = ctrl_low[5], ctrl_high[5]    # simulated gripper range in radians

def read_joints_rad():
    o = robot.get_observation()
    q = [np.radians(o[f"{j}.pos"]) for j in JOINTS[:5]]
    q.append(G_LO + (o["gripper.pos"] / 100.0) * (G_HI - G_LO))       # percent -> radians
    return np.array(q)

prev_q, prev_t = read_joints_rad(), time.perf_counter()
try:
    while True:
        t0 = time.perf_counter()
        q = read_joints_rad()
        qd = np.clip((q - prev_q) / max(t0 - prev_t, 1e-3), -50, 50)     # differenced velocity
        prev_q, prev_t = q, t0
        obs = np.concatenate([q, qd, task_object_values()])              # same order as in simulation
        a = sess.run(["action"], {"obs": obs.astype(np.float32).reshape(1, obs_dim)})[0][0]
        target = ctrl_low + 0.5 * (a + 1.0) * (ctrl_high - ctrl_low)     # kualia's action mapping
        cmd = {f"{j}.pos": float(np.degrees(target[i])) for i, j in enumerate(JOINTS[:5])}
        cmd["gripper.pos"] = float(np.clip((target[5] - G_LO) / (G_HI - G_LO) * 100.0, 0, 100))
        robot.send_action(cmd)
        time.sleep(max(0.0, 1.0 / HZ - (time.perf_counter() - t0)))
finally:
    robot.disconnect()

task_object_values() is yours: whatever the task observes besides the arm (a target position relative to the base, a button's press depth). The Export page lists the observation layout; the ONNX deployment post explains why you should measure or fix those values rather than guess them.

Before the first run

  • Zero pose. In simulation every episode starts with all joints at 0 rad. After calibration, check that commanding 0° on each joint puts the real arm in the same pose as the simulated one; if not, add a per-joint offset in the conversion.
  • Rate. Hold the task's control rate. If your loop cannot, retrain in kualia at the rate you can hold — it is one setting.
  • Small steps first. Start with a small max_relative_target, servos torque-off while you print commands, then power on with the arm clear of the table.
  • Sim-to-real. A policy that works in simulation is a strong start, not a guarantee. If the real arm hesitates, ask alia to randomise starting poses or object positions more widely and retrain.

Try it

Train an SO-101 skill — the free plan includes one robot project and 200K training steps, one full first run. No demonstrations to record, and nothing to install until the policy is ready for the arm. If something on hardware does not match the simulation, tell us; that feedback goes straight into the next version of the SO-101 tasks.