Sim to real · Volume 1

From simulation.
To an arm on your desk.

Adaptive Robot Arm

Write an arm simulator that models a servo whose firmware you can’t read, compare classical control with learned adaptation, then run the trained model on a desk arm you designed and printed. Nine modules end in measurable gates, and eight tasks, from waving hello to throwing a ball into a cup, put each build to work. Every result belongs in the report, including the runs that fail.

Start on your laptop. Buy the hardware when you reach Module 6.

09build modules
02parts: software + hardware
12written episode companions
08tasks on the ladder

Make the theory move

You leave with
more than notes.

The same question runs through every build: what must a network learn so a hidden vector captures a robot’s real dynamics?

The answer becomes a simulator, a fair benchmark, a learned controller, and a desk arm you designed, printed and built.

  1. 01

    An arm simulator you wrote and can explain line by line, including a model of a servo whose firmware you cannot read.

  2. 02

    One benchmark that scores the stock servo loop, PID, gravity feedforward, EKF-adaptive and learned adaptation on the same perturbation set, in sim and on hardware.

  3. 03

    A robot arm you designed in CAD, printed and built, running your trained model with an unknown payload.

  4. 04

    A public repo and episode series that document every gate and every task on the ladder, including the ones that failed.

The curriculum

Build. Measure.
Earn the next step.

Nine modules. Each one has a lesson, a lab, a deliverable, and a measurable gate. Keep the evidence, including the results that surprise you. On the map, each episode companion sits next to its module.

Course map

The task ladder

Eight tasks.
One arm.

The modules add tasks to the arm’s repertoire, roughly from easy to hard. Each task except the melody runs in sim first and then on the printed arm, and Module 9 replays the whole ladder. Sim checks are automated; hardware checks need a video for trainer review.

Task 1M1, real in M7

Wave hello

What the arm does
Waves with open-loop sines on the elbow and wrist.
What it teaches
Joint space, and the servo loop’s lag: the wave shrinks and falls behind as the frequency rises.
Check
Sim and real joint traces, overlaid in Module 8.
Task 2M2, real in M7 and M9

Draw

What the arm does
Draws the benchmark figure-eight, then your name from an SVG path, with a pen in a spring-loaded holder.
What it teaches
Inverse kinematics, trajectory timing, and why a payload makes a position servo sag.
Check
The scanned drawing, registered to the arm’s frame by the printed marks on the drawing sheet and overlaid on the command, with its RMS deviation reported.
Task 3M3, real in M9

Weigh it

What the arm does
Lifts a cup of weights, moves it briefly and reports the mass.
What it teaches
Kalman filtering and observability.
Check
Within 10 g in sim; on the real arm, the error against the scale is reported.
Task 4M4, real in M9

Which cup is heavier?

What the arm does
Wiggles each of three identical-looking cups, holding 50, 100 and 150 g, for 0.5 s, then lines them up by weight.
What it teaches
What a learned latent captures, read out with a linear probe.
Check
The right order in 9 of 10 sim trials.
Task 5M5, real in M9

Throw

What the arm does
Flings a ping-pong ball from a printed spoon into a cup on the table, 40 cm from the base to start; the Module 1 sim sets the final distance.
What it teaches
Reward design and domain randomization, with the same trainer as the tracking policy.
Check
A hit rate of at least 60% in sim; the real hit rate is reported, whatever it shows.
Task 6M7, on the beat in M8

Play a melody

What the arm does
Strikes an 8-note glockenspiel with a mallet, on hardware only: the melody tests the real command path, so it has no sim version.
What it teaches
Command-to-motion delay, which grows with the size of the move. Uncompensated, notes after long moves land late and the rhythm stumbles; with each strike sent early by the delay the servo model predicts for its move, the melody keeps time.
Check
Strike times from a microphone recording, compared with the score after removing one constant offset, since the recording shares no clock with the commands. RMS error under 20 ms after compensation.
Task 7M6 in sim, real in M9

Dock the drone

What the arm does
Lifts a printed dummy of the Volume 2 drone (230 g) by its handle from a pad into a cradle and back.
What it teaches
Torque budgets: peaks against the stall torque, holds against the rated torque.
Check
10 of 10 cycles without a safety latch, with the shoulder’s RMS current per cycle under its rated-torque current (about 0.9 A).
Task 8M5, real in M9

Ball in a cup (stretch)

What the arm does
Swings a ball on a string up into a cup held by the gripper.
What it teaches
The classic policy-search demo: string slack and catch timing.
Check
Success rate over 20 tries, reported whatever it shows.

Before you begin

Bring curiosity.
And some Python.

  • Solid Python, matrix basics and derivative intuition. No control theory, reinforcement learning, CAD or electronics background is assumed; each is taught where a module needs it.
  • A laptop for Modules 1–5. JAX, Flax and Optax form the learning stack and run on its CPU, so no GPU is needed; training in under 2 hours is a design target, not a measured time. Every tool is open source or free to use, and Part 1 needs nothing else, so the hardware can wait until Module 6.
  • For Modules 6–9: a 3D printer with a bed of at least 180 × 180 mm, or a print service; a soldering iron for pin headers and heat-set inserts; a scale that reads to 0.1 g; and the parts below, about 505 € at October 2026 prices including the printer, or about 315 € without it.
  • Desk safety: the arm is desk-sized and weak, but it pinches fingers, sweeps things off the desk and, for one task, throws a ball. Keep hands out of its reach while torque is on, throw only ping-pong balls and keep faces out of the throw line. Every powered move goes through the safety supervisor, and the kill switch in the 12 V line cuts every servo at once.
  • Read the starter-kit README first. The kit supplies bench.py, conventions.py, safety.py and the checks in gates/ and tasks/; you build sim/, controllers/, estimators/, learning/, cad/ and the Pico 2 app, with a PROGRESS.md and results that record commit, config and seed. Every threshold is a starting value, recalibrated after the course author’s own Module 1 and Module 8 runs.
How the course works

Your code. Your evidence.

Read the lesson, implement the lab, and keep the evidence for the module’s gate: the result, the commit, the configuration, and the seed.

“Studied” is a reading bookmark. A passed gate is a reproducible result. Hardware gates also need a trainer’s review of your logs and video.

There is no fixed time estimate: progress depends on the builds and debugging. Part 1 needs no hardware purchase or paid cloud compute.

The physical part

One kit.
Four hardware modules.

The kit costs about €505 in parts, including a Bambu Lab A1 mini printer at its October 2026 price of €189 and a sixth servo for the test rigs. If you own a printer with a 180 mm bed, it is about €315. Part 1 needs only a laptop, so the purchase can wait until Module 6.

Explore the hardware list Purchase from module 06
Shop prices as of October 2026, before shipping. “About” marks typical prices that were not looked up.
PartQuantityBudgetBuild note
Feetech STS3215 12 V 30 kg·cm servo (ST-3215-C018)6€159Five for the arm and one for the bench and torque stand, which is also the spare; the 7.4 V version fails the Module 6 torque gate on the example arm, and several shops list the 12 V one as backordered.
Waveshare Bus Servo Adapter (A), SKU 255141€6It takes 9–12.6 V, so the 12 V supply plugs straight into its barrel jack, and a jumper chooses USB to the laptop or its UART header to the Pico 2.
12 V 5 A desktop supply with 5.5/2.1 mm plug (Mean Well GST60A12-P1J)1€18Its 5 A covers one stalled servo while the others move; two stalls, or a throw that drives several joints at full effort, can trip its overload protection and cut the whole arm.
Mains cable, IEC C13 to Schuko1About €5The supply has a C14 inlet and comes without a cable.
Inline switch for the 12 V line (the kill switch)1About €5It cuts every servo at once and the arm falls limp, which also releases an arm that holds its last goal after the laptop stops; closing it must move nothing until you re-arm.
Bambu Lab A1 mini1€189Skip it if you own a printer with a 180 mm bed; 189 € is its October 2026 price at 3DJake, against a regular 319 €.
PETG filament1 kgAbout €20PETG rather than PLA, because the servos run warm under load and PLA softens around 60 °C.
M3 heat-set inserts100€9For joints that are opened again and again, where a thread the screw cut itself would wear out.
M2 and M3 screws1 setAbout €10Parts that stay closed take M3 screws straight into a 2.6 mm hole, where the screw cuts its own thread.
Raspberry Pi Pico 2 with headers2€13One reads the torque stand’s load cell through the HX711 and streams it to the laptop; the other runs the model and the safety supervisor on the servo bus in Module 9’s Round 2.
1 kg load cell with HX7111€18On a 15 cm lever it reads at most about 15 kg·cm, so the torque stand measures up to half of stall; it later becomes Volume 2’s thrust stand.
USB webcam (Logitech C270)1€18Its AprilTag ground truth is independent of the servo encoders; calibrate it with a checkerboard, because its absolute accuracy depends on that calibration.
Ping-pong balls6€4For the throw; throw only these, and keep faces out of the throw line.
8-note children’s glockenspiel1€10For the melody, which tests the real command path and so has no sim version.
Calibration weights, 10–500 g1 set€17Known masses for the payload cups, the payload step and the pendulum bench, where known masses at known lengths identify the servo.
String (fishing or kite line)1 rollAbout €3For the swinging weight, the ball in a cup and the payload latch’s pull cord, which drops the payload step’s weight from outside the arm’s reach.
Open SimpleFOC joint (optional): DFRobot 2804 gimbal motor with AS5600 encoder, plus a SimpleFOCMini driver1About €26 with import VAT, plus shippingFor the Module 8 stretch: the same fits on a motor whose firmware you can read; whether it stays a stretch, becomes core or is dropped is still open.

The arm is desk-sized and weak, but it still pinches. Keep hands out of its reach while torque is on, keep the kill switch in the 12 V line within reach, and stall at most one servo at a time. Several shops list the 12 V servo as backordered, so check the stock before you order. Parts list with shop links (CSV) ↓

Follow the experiment

Twelve chapters.
Every result counts.

Read the written companion to every planned episode. Recording and customer access are forthcoming; the Free and Customer labels show the intended recording release track.

Episode 00Free track

Can you solve this NVIDIA interview question?

The course’s opening question: what must a network learn so that a hidden vector captures a robot arm’s real dynamics?

Read companion
Episode 01Free track

I wrote a robot arm simulator from scratch

Rigid-body dynamics, a servo whose firmware stays closed and a shared 12 V supply, with four checks to run before trusting any of it.

Read companion
Episode 02Free track

I broke my robot arm on purpose

A frozen benchmark turns the gap between a nominal arm and a changed one into failures you can reproduce and explain.

Read companion
Episode 03Customer track

Teaching a robot arm to weigh things

An EKF estimates the payload and a disturbance torque per joint, with a lesson in what a static hold can’t reveal.

Read companion
Episode 04Free track

A, B, C or D? I trained all four

One encoder, four objectives and one linear probe: the ablation that can confirm or overturn the course’s answer.

Read companion
Episode 05Customer track

Building the history encoder

Causal timestamps, held-out arms and the right observation channels matter as much as the network.

Read companion
Episode 06Customer track

RMA in my own JAX sim, and a throw

A privileged teacher, a history-only student and a new reward that throws a ping-pong ball, all in the sim you wrote.

Read companion
Episode 07Free track

I designed a robot arm in Python

A parametric arm in build123d, drawn around a torque budget and a print bed, that writes its own physics into the sim.

Read companion
Episode 08Customer track

Printing and building it: the first wave and the first drawing

Print, build and calibrate the arm, then make its first moves on stock settings, every one of them through the safety supervisor.

Read companion
Episode 09Customer track

How wrong was my CAD? Identifying a servo I can’t open

Weigh, swing and load the printed arm and the kit’s sixth servo until CAD, sim and hardware sit in one table with error bars.

Read companion
Episode 10Customer track

The model meets the printed arm

Every controller off-board through the same USB route first, then the learned model on the Pico 2, with the safety supervisor on in both rounds.

Read companion
Episode 11Free track

My arm draws, weighs, throws and docks a drone

The task ladder replayed on the printed arm, each task with a check fixed in advance and every result reported, whatever it shows.

Read companion

Choose your depth

A story to follow.
A course to build.

All written lessons, companions, and downloads on this site are accessible now. These tracks describe the planned series and its teaching resources.

Free

Read the complete course documentation and written companions now. The spec’s six free episodes carry the story: the hook, the first two builds, the Module 4 ablation, the CAD design and the task ladder on the real arm. The starter kit, with the benchmark, the safety supervisor and the gate and task checks, downloads with a free account.

  • All nine module guides and labs
  • Six Free episode companions
  • The eight-task ladder with its checks
  • Primary readings and gate criteria for every module

Customer

Planned packaging for the six build episodes behind the free story. Customer-labeled companions are free to read with an account; no checkout, subscription or purchase exists.

  • Six deeper build companions
  • Estimator, encoder and policy build guidance
  • Build, safety, identification and deployment procedures
  • No purchase required to read the current course

Trainer

Planned support for teaching and reviewing the course. Gate criteria and common failure modes are already part of each public module.

  • Nine measurable gate rubrics
  • Common failure modes and diagnostic prompts
  • Reflection questions for technical review
  • Trainer review of the wiring plan and of hardware gate videos
Download trainer guide ↓

Your first build is one click away

Start with the simulator.
See where it takes you.

Open module 01