I strapped a water bottle to a $50 robot car and said, out loud, “I put a load on you. Check yourself.” The car stopped driving and started running experiments on itself. After its first test, its model of its own body said that a gentle push at 60 PWM would move it 0 cm. It moved 17. The model was not vague about this. It was certain, and it was wrong.
Two minutes and ten experiments later, the car had a new model of its body, and its next seven predictions all landed within two standard deviations of what the camera measured: distance, sideways drift and turn, every time.
That car is AIRO (Adaptive Intelligence for Robots). I built it in nine days during the Meta Global AI Developer Hackathon. In my last post I trained a reinforcement learning policy on thousands of randomised bodies so that it would survive whatever body the real car turned out to have. AIRO does the opposite. It keeps one explicit physics model of the body it has right now, keeps checking it, and when it stops being true, measures again. This post is about how that loop works, how a language model fits into it without ever touching the wheels, and what a real floor taught me that simulation never did.
Bodies change, models don't
Every mobile robot drives by a model of its own body: how far a motor command moves it, how fast it turns, how long the command takes to arrive. An engineer tunes that model once. Then the robot carries a heavy tote, tows a cart, its tyres wear or its battery sags. The model is now wrong, and the robot stops short of the station or drifts into the wall, and nothing in its software notices. The fix is a service call. Vendor estimates put the purchase price at only 25–40% of a robot's lifetime cost; the rest is setup, tuning and upkeep.
Adaptive control has attacked this for decades, and the idea of a robot that models itself is not new either: Bongard, Zykov and Lipson's starfish robot inferred its own morphology from its motions in 2006, and Cully et al.'s hexapod found new gaits after damage in 2015. What I wanted was a version that runs on a toy, with one phone camera, and that can explain itself: say what it thinks changed, what experiment it will run next and why, and what it now believes, in plain words, with every number coming from the physics rather than from the language model.
The loop
- Notice. Every half second the car's measured motion is scored against a cloud of predicted futures. When reality leaves the cloud, the body changed.
- Experiment. A model (Muse Wonder) chooses each test drive, a step, a pivot or an arc, and must state a falsifiable hypothesis. The physics predicts the outcome before the wheels turn.
- Refit. A seven-parameter body model is fitted to what the camera saw, with a Laplace posterior that becomes the new cloud.
- Verify. The new body is accepted only once a tight prediction lands within 2σ.
- Remember. Each body goes into a library the whole fleet shares, so the next robot that meets the same load recognises it with one test instead of relearning.
Seven numbers for a body
The car is an Elegoo Smart Robot Car V4: an Arduino UNO, four TT gear motors, skid steering, a BLE module, and no wheel encoders. All it can be told is two PWM values, left and right. All it can see is a marker on its roof, tracked by a phone 1.8 m above the floor at about 20 Hz. So the body model has to map PWM to motion, and it has to be small enough to fit from a few test drives.
Each side has a gain past a soft dead zone. The command acts after a delay \(\tau\) and reaches the wheel through a first-order lag:
$$u_s(t) = g_s\, p_s(t-\tau)\; \sigma\!\left(\frac{|p_s(t-\tau)| - d_z}{2}\right), \qquad \dot w_s = \frac{u_s - w_s}{T_\text{lag}}, \qquad s \in \{L, R\}$$and the chassis moves as a unicycle with a skid-steer turning efficiency \(\eta\) and a drift term \(\kappa\):
$$v = \tfrac12 (w_L + w_R), \qquad \omega = \eta\,\frac{w_R - w_L}{0.145\ \text{m}} + \kappa\, v, \qquad \dot x = v\cos\theta,\ \ \dot y = v\sin\theta,\ \ \dot\theta = \omega$$| Parameter | Meaning | Which test excites it |
|---|---|---|
| \(g_L, g_R\) | speed per PWM, each side | any motion |
| \(d_z\) | dead zone: PWM before a wheel moves | a command near it |
| \(\tau\) | command delay (BLE, firmware, motor driver) | any motion |
| \(T_\text{lag}\) | wheel response time constant | any motion |
| \(\eta\) | turn efficiency; skid steering scrubs, so the track width alone overpredicts turning | a turn |
| \(\kappa\) | drift, turn per unit of forward speed | a turn |
Fitting is nonlinear least squares on every pose sample of every test drive: predicted minus measured \(x\) and \(y\), plus a tenth of the heading error in radians. Three details mattered. Delay and lag trade off against each other and create local minima, so the fit restarts at \(\tau = 0.05\), \(0.15\) and \(0.3\) s and keeps the best. Gradient descent cannot carry a gain through zero, so after a change the fit also restarts with the left, the right and both gains negated, which is how a reversed motor wire is found. And a single straight drive cannot separate gain from dead zone, because any \(g\,(p - d_z)\) through one point fits it, so a learn only concludes after a slow straight (60 PWM or less), a fast one (100 or more) and a pivot.
The ghost cloud
A point estimate cannot tell you whether a surprise is real, so the fit needs an uncertainty. AIRO uses a Laplace approximation: a Gaussian around the best fit, with the curvature taken from the residual Jacobian \(J\) and a broad physical prior,
$$\Sigma = \left(\frac{J^\top J}{s^2} + \operatorname{diag}\!\left(\sigma_\text{prior}^{-2}\right)\right)^{-1}, \qquad s^2 = 14\;\tau_\text{corr}\;\frac{\text{RSS}}{n - 7}.$$Two things in that formula are not textbook. A parameter that no test has excited yet (the dead zone before anything slow has run, \(\eta\) before any turn) has its Jacobian column zeroed, so it keeps its prior spread instead of borrowing false confidence from unrelated data. And the noise variance is inflated. The residuals of a trajectory fit are strongly autocorrelated, so treating a few hundred pose samples as independent measurements makes the posterior far too narrow. Scaling by the residuals' autocorrelation time \(\tau_\text{corr}\) fixes most of that; the factor 14 covers the rest (each segment's noisy start pose and the curved delay–lag ridge), and it was calibrated on held-out tests in simulation. Over 30 seeds the true outcome lands within 2σ of the prediction 87–100% of the time, which is what a 2σ interval should do.
Twenty bodies drawn from \(\mathcal N(\hat\theta, \Sigma)\) and rolled forward over the planned commands are the ghost cloud on the dashboard. After ten tests its radius, the spread after 1.5 s of a gentle arc, is 0.3 cm in a model-exact simulator and 1.1 cm in the MuJoCo twin.
Noticing
While the car drives, every 0.5 s window is replayed: each cloud member is rolled from the window's first measured pose over the commands the car actually received, and the measured displacement is compared with the cloud's:
$$s_{xy} = \frac{\lVert \Delta p_\text{meas} - \overline{\Delta p}\rVert}{\sqrt{\operatorname{var}\Delta p + (1\ \text{cm})^2}}, \qquad s_\theta = \frac{|\Delta\theta_\text{meas} - \overline{\Delta\theta}|}{\sqrt{\operatorname{var}\Delta\theta + (0.03\ \text{rad})^2}}, \qquad s = \max(s_{xy}, s_\theta).$$A sudden change triggers when the median of the last three windows exceeds 3, so a single spike never does. A slow change, like a tow on a car that is already loaded, can sit below 3 for ever, so a capped CUSUM sums the excess as well, \(S \leftarrow \max(0,\ S + \min(s, 3) - 1.8)\), and triggers above 3. Clean windows stayed under 1.6 in 40 evaluation runs. Across 70 simulated runs, bare and loaded, there were no false triggers.
The windows have to be scored against the commands the rig actually sent, not the ones the planner intended. On BLE a tick occasionally arrives late, and if the prediction assumes it was on time, a perfectly healthy car reads as a changed body.
On the real car, on the afternoon of November 1, this fired during a patrol: “My body feels different: I drove 32 cm where I expected 23 cm forward” (predicted 23.3 ± 1.8 cm, surprise 3.4). The car halted, asked Muse Spark to look at it through the camera (“The camera sees nothing on me”), relearned, and was driving again 27 s later with both gains about 20% higher. Nothing was on it. My best guess is warm motors after an hour of testing, but that is a guess; what the car measured is just that it had become faster.
Experiments, not guesses
The test library is open-loop and small: straight steps at several speeds and in reverse, a slow ramp, pivots both ways at three powers, arcs both ways and a short pulse. Each one is there to measure something: steps the gains and delay, the ramp the dead zone, pivots \(\eta\), arcs how the two sides mix, the pulse the delay and coast. Every test is checked against the free floor before it runs.
Which test to run next is chosen by Muse Wonder, through tools. Before each test it has to give a plain-language reason and a technical hypothesis that the result could prove wrong, and it may only quote numbers that the tools returned. From a learn on November 1:
“ramp_120 will show near-predicted ~35 cm forward if dz ≈ 0, or much less/short onset if dz is large — this cuts
the largest spread (dz sd 5.48).”
“step_60 will go ~17.5 cm forward with ~-1.2° turn if gains hold at low PWM; proportionally shorter travel would reveal a dead
zone that ramp masked at high PWM.”
That is the right instinct: pick the test that cuts the widest part of the posterior. Before the wheels move, the physics (not the language model) records its prediction, mean and standard deviation for forward distance, sideways drift and turn. Afterwards the camera's measurement is scored against it. Here are all ten tests from the water-bottle learn:
Table view
| Probe | Forward, cm | Sideways, cm | Turn, ° |
|---|---|---|---|
| pulse 100 | 14.3 ± 1.9 → 9.3 (-2.3) | 0.1 ± 0.5 → 0.3 (+0.2) | 0.7 ± 3.9 → -0.3 (-0.2) |
| step 60 | 0.0 ± 0.0 → 16.6 (+16.6) | -0.0 ± 0.0 → 0.4 (+0.4) | -0.0 ± 0.0 → -0.8 (-0.4) |
| step 110 | 19.7 ± 4.5 → 34.0 (+3.1) | -2.2 ± 5.7 → 0.8 (+0.5) | -9.0 ± 27.9 → -0.3 (+0.3) |
| pivot L 100 | -1.4 ± 3.0 → -1.7 (-0.1) | -1.1 ± 2.2 → 0.4 (+0.6) | 113.3 ± 64.5 → 192.0 (+1.2) |
| ramp 120 | 30.6 ± 4.6 → 35.2 (+1.0) | 1.1 ± 4.6 → 1.4 (+0.1) | 4.6 ± 16.5 → -0.1 (-0.3) |
| step 40 | 10.9 ± 2.9 → 9.3 (-0.5) | 0.0 ± 0.5 → 0.3 (+0.2) | 0.3 ± 4.6 → -0.2 (-0.1) |
| arc R | 23.4 ± 2.5 → 22.2 (-0.5) | -10.0 ± 2.7 → -8.9 (+0.4) | -45.9 ± 10.1 → -44.4 (+0.1) |
| pivot R 150 | 0.3 ± 0.6 → -1.7 (-1.8) | 0.5 ± 0.8 → 1.5 (+0.8) | -247.5 ± 25.9 → -279.1 (-1.2) |
| back 60 | -18.4 ± 1.5 → -17.6 (+0.5) | 0.3 ± 1.0 → -0.7 (-0.7) | -1.5 ± 6.3 → 0.1 (+0.2) |
| pivot L 150 | -0.2 ± 0.6 → -1.2 (-0.8) | 0.3 ± 0.9 → 2.0 (+1.3) | 259.8 ± 23.8 → 279.2 (+0.8) |
Predicted mean ± sd → measured (z).
The first three tests miss, and they miss informatively. The short pulse goes 9 cm instead of 14, and the refit evidently explains it with a large dead zone, which predicts that 60 PWM will not move the car at all. It moves 17 cm, and the dead zone collapses. The fast step goes 34 cm instead of 20, and the gains are corrected. From then on, seven tests in a row land inside 2σ on every axis: a pivot, the ramp, a crawl at 40 PWM, an arc, two hard pivots and a reverse. The car named the result Body #5, “nimble”: “This car starts moving with barely any push and drives fairly straight, so its wheels seem free and evenly matched rather than stiff.”
A prediction only counts if it was tight
After a surprise mid-mission, the relearn is not accepted because the fit converged, and not because the language model is satisfied. It is accepted when a test in the regime where the surprise happened (straight or turning) lands with \(|z| < 2\) on all three quantities, and the prediction was tight: a standard deviation of at most 3 cm forward, 3 cm sideways and 6° of turn.
The second condition is the one that matters. A wide enough prediction confirms anything; the first pivot in the chart above “landed” with a prediction of 113 ± 65°, which is not evidence of much. Requiring both a hit and a narrow target turns “the model fits” into “the model predicted something it could have got wrong, and didn't”. A change that no body explains, with \(|z| > 5\) after refitting, stops the car as a hardware fault instead of being learned.
What the real floor taught me
In simulation, a surprise means the body changed. On the real floor, the surprise detector turned out to be the best bug detector I have ever built. Almost every alert in the first days was the car correctly reporting that it had not moved the way its model said, for a reason that had nothing to do with its body.
- The marker was not on the turning centre. A marker taped a few centimetres off the axis swings on a circle while the car pivots in place, so every pivot looked like a slide, and pivots were rejected as nonsense. The measured offsets were 3.6 to 6.4 cm, and the bottle shifted the centre by another 5 cm. The fix is a two-pivot check, one each way, that fits where the turning centre sits before anything is learned.
- Slow pivots stall. “Turned 0° where I expected 27°”, then twice “Hardware fault: nothing I learn explains how I move”. Below about 70 PWM a skid-steer pivot simply does not break the tyres loose, and the seven-parameter model has no term for that. After a minimum pivot power was added, the conclusion in my notes reads: every earlier “body change” had been a stall. The same happened for slow straights below 45 PWM (“drove 0 cm where I expected 7 cm”).
- The controller drove in ways no test had taught. Pure pursuit rounded the patrol corners on one wheel, a regime the test library never excites, so the corners read as surprises. Patrol switched to square corners: stop, pivot, drive.
- Outlier rejection can eat the evidence. To survive a test that runs into something, a test whose residual is four times the median and over 2 cm is dropped. During one recorded run the body really had changed, so every new test looked like an outlier: four were thrown out as “bumped into something” and the car learned nothing until it hit the safety inset. Now at most one test per learn may be dropped.
- A language model will narrate a broken fit with confidence. One early learn hit the parameter bounds and returned \(g_L = g_R = 0.02\), \(d_z = 43.8\), \(\eta = 0.09\). Wonder's conclusion: “This bare chassis drives symmetrically (g_l = g_r = 0.02) but is hard to get moving and scrubs badly in pivots.” Fluent, plausible, and describing an optimiser stuck on its upper bound. That learn is why the learning gate exists: the slow, fast and pivot tests are required, and no body is named until the physics says the fit is determined.
Between the bugs, the basics held up. A learn on the bare car got 9 of 10 predictions inside 2σ, and 8 of 8 drives to a clicked point arrived within 5 cm (median 2.2 cm), with no encoders. Once the stalls were fixed, the car patrolled with the bottle on for 3.5 minutes without a single false alarm: at patrol speeds the bottle did not change the body enough to matter, which is itself a measurement.
Remembering bodies
Relearning from scratch every time is wasteful when the change is one the robot has met before. Each confirmed body goes into a library, one per robot model, shared by the fleet: the parameters, the cloud members, what caused it, which robot learned it, and a self-portrait drawn by Muse Image.
When a surprise fires, remembered bodies whose clouds explain the window since the change are offered first, and a recall costs one confirming test. When an arm puts a tote on a car, the car does not wait to be surprised at all: it pivots once in place and weighs every body it knows. A body qualifies only if that pivot lands within \(|z| < 2\) with a tight prediction; qualifying bodies are ranked by Gaussian log-likelihood, which charges a wide cloud for its spread so a vague body cannot win; and the current body is kept unless another is at least \(e^{1} \approx 2.7\) times more likely. If the top two are closer than that, a second pivot the other way separates them.
To test this beyond one car, I built a MuJoCo warehouse at 1:4 scale: three cars, robot arms loading totes, walking workers and a forklift. Totes are welded to the deck when loaded, so their mass genuinely loads the car's wheels rather than being a flag in the code.
Across five runs of the carry benchmark in the normal warehouse, the check named the right body for 41 of 41 heavy loads (5 learned, 36 recalled from another robot's memory), 40 of 40 light ones and 81 of 81 unloads, with a median check of 2.1 s and no surprise relearns. The first heavy tote of a run is learned at the cell in about 12 s; every later one, on any robot, is recalled.
Where the language models sit
The rule I held to: no model in the control loop. The car runs at 20 Hz on the fitted physics. Language models plan experiments, look at the car, read the floor and take commands, and every number they quote comes from a tool.
| Model | Job |
|---|---|
| Muse Wonder | The scientist: picks each test with a hypothesis, decides between recall and relearn, concludes and names the body. 12 s budget per relearn, then a scripted policy finishes. |
| Muse Spark | Turns typed or spoken commands into tool calls (go to, turn, push, patrol, learn, say). Also looks at the car when its body changes. “Stop” never waits for it. |
| SAM 3.1 | Segments the floor; totes, stations and obstacles become polygons and a 2 cm occupancy grid for A*. |
| Muse Voice Transcribe | Realtime speech to commands. |
| Muse Image | The self-portrait on each memory card. |
The budget and the fallback are there because of latency. Wonder took 6 to 20 s per turn, sometimes over 40, while a test drive takes about two. Live, it often got one turn before the scripted policy finished the relearn, and both real-car relearns on November 1 were finished by the fallback. That is the right failure mode: a slow scientist makes the robot less articulate, not less safe. The design consequence is worth stating plainly: the language model is the part you can remove. Without an API key, a fixed test schedule runs and everything else works.
Two features were also written by a model. Through a Codex CLI harness pointed at the Meta API, Muse Spark wrote the code that lets the car push a blocking box aside (or ask for help) and the code that sizes a detour from the body's learned sideways spread. Both merged after review; the review's first finding on the push code was that it had no safety checks while pushing.
Numbers
Simulation, ten seeds per row, scripted scientist, no API. Each seed learns once, then delivers with the body changed 0.3 m into the drive.
| Model-exact simulator | MuJoCo twin | |
|---|---|---|
| Learn, 10 tests: cloud radius | 0.3 cm, parameters within 7% of truth | 1.1 cm |
| Held-out tests within 2σ | 100% | 100% |
| False triggers, 70 runs | 0 | 0 |
| Weight: detected / confirmed / delivered | 10/10 at 1.1 s, 10/10, 10/10 | 10/10 at 6.5 s, 10/10, 10/10 |
| Tow: detected / confirmed / delivered | 4/10, 4/4, 10/10 | 10/10 at 1.7 s, 10/10, 10/10 |
| Reversed left motor | 10/10 at 1.1 s, 9/10, 10/10 | 10/10 at 1.1 s, 10/10, 10/10 |
| Slippery floor patch | 10/10 at 6.0 s, 10/10, 10/10 | 0/10 detected, 10/10 delivered |
| Recall vs relearn | 2.1 s and 1 test, vs 3.7 s and 2 tests | |
The misses are as informative as the hits. The model-exact simulator's tow is mild (gains −15%) and only 4 of 10 cross the threshold, though every run still delivers. The twin's slippery patch is 0.4 × 0.5 m, the car crosses it in well under a second, and the model has no slip term, so it is never detected.
What this does not show
- On the real car, the bottle was not detected; it was announced. The water-bottle learn above started because I told the car to check itself. The real-car detections I have (November 1) were a gain change of unknown cause and a series of stalls. Detection of loads, tows and motor faults is demonstrated in simulation.
- The bottle and the battery are confounded. The body the car started from (#4, “stiff”) was learned the day before on a low battery, so I cannot say which part of the change from #4 to #5 is the bottle.
- One-test recall in 2.1 s is a simulation result. On the real car, the one recall went through a full scripted relearn (32 s) that ended at a body it already knew.
- Seven parameters are not a car. There is no term for slip, drag or battery sag, and changes under about 8% of speed go unnoticed. Drift is weakly identifiable, and the learning gate reports its sign as undetermined when it is within 2σ of zero.
- The uncertainty inflation is calibrated in simulation. On hardware only the autocorrelation factor adapts.
None of these is fatal, and each one points at the next experiment: a real-car detection benchmark with loads added mid-drive and fresh batteries, a slip term the probes can excite, and recall measured on hardware.
Code
Everything is MIT-licensed. The warehouse twin runs offline in about a minute, without an API key:
git clone https://github.com/airo7/airo-meta && cd airo-meta
uv sync
uv run scripts/demo.py --site factory # http://127.0.0.1:8000
uv run scripts/eval.py --n 10 --rig mujoco # the benchmark above
airo/
body.py seven-parameter model, rollout, fit with sign search, Laplace posterior, surprise
probes.py the test library, free-space check, predicted vs measured
scientist.py Wonder tool loop, scripted fallback, verified relearn, check after a load
memory.py the shared body library and recall matching
mission.py deliveries, the surprise monitor (median of three, CUSUM)
eye.py where the turning centre sits relative to the marker
mjsim.py the MuJoCo twin, a DC-motor model per wheel
The repository is github.com/airo7/airo-meta, and the project site with the full technical write-up is airo7.github.io/airo-meta. The car's Arduino firmware is from the earlier sim-to-real project; everything else was written during the hackathon, Oct 28 to Nov 4, 2026.
References
- Bongard, Zykov & Lipson (2006). Resilient machines through continuous self-modeling. Science 314(5802).
- Cully, Clune, Tarapore & Mouret (2015). Robots that can adapt like animals. Nature 521.
- MacKay (1992). A practical Bayesian framework for backpropagation networks. Neural Computation 4(3). (The Laplace approximation.)
- Page (1954). Continuous inspection schemes. Biometrika 41(1/2). (CUSUM.)
- Coulter (1992). Implementation of the Pure Pursuit Path Tracking Algorithm. CMU-RI-TR-92-01.
- Garrido-Jurado et al. (2014). Automatic generation and detection of highly reliable fiducial markers under occlusion. Pattern Recognition 47(6).
- Todorov, Erez & Tassa (2012). MuJoCo: A physics engine for model-based control. IROS.
- Sim-to-Real Is a Measurement Problem, the earlier project on the same car.