↓Skip to main content

Updating Software and AI in Live Machines

5 mins

Phones and laptops update overnight on a charger, so a failed update just means trying again tomorrow. Robots, drones, and vehicles often don’t get that downtime. Fleets run around the clock, and a security or safety fix can’t wait for the next scheduled stop, so updates happen in the field, mid-route or under load, where a bad one can strand the machine mid-task.

Cloud teams solve this with spare capacity: drain a server, update it, and let the load balancer absorb the traffic. Physical machines lack that redundancy, because spare hardware adds weight, power draw, and cost. A standby drone on the ground cannot take over for one that reboots mid-flight, and small failure rates become significant at fleet scale, where a 99% success rate across 1,000 robots still leaves 10 disabled in the field.

Embedded single-board computer

Two questions decide how to update each part of the machine:

  1. Does it fail loudly or quietly? Deterministic code, such as the OS, drivers, and control loops, typically fails loudly, with a crash, a failed boot, or a missed deadline that a health check catches. Silent logic or calibration bugs are the exception. Learned models fail quietly. A new perception model can install cleanly, boot, pass every check, and still drop objects or misread dim light. Offline replay won’t reveal it either, because small errors compound into states the model never saw in the logs,1 and a model that scores better on logs can still drive worse.2
  2. Can the machine pause? A warehouse robot can wait at its dock for a few minutes. A drone in flight or a car on the highway has to keep controlling itself through the whole update.

Rule 1: Fails Loudly (Deterministic OS & Firmware Updates) vs. Rule 2: Fails Quietly (Learned AI & Behavior Updates)

Combining them gives four cases, not a formal standard, just a practical way to organize how existing tools and research fit together:

Can pauseCan’t pause
ExamplesWarehouse robots, robot armsDrones, vehicles, legged robots
Deterministic (fails loudly)1. A/B swap at the dock2. Swap between control ticks
Learned (fails quietly)3. Staged model swap4. Shadow mode and safety monitor

The four cases build from the baseline in case 1: each axis drops an assumption, that the machine can pause, or that failures are loud, until case 4 drops both.

2x2 taxonomy for updating live machines: Can pause vs. Can’t pause and Deterministic vs. Learned

1. Deterministic, can pause: A/B swap at the dock #

This is the baseline case, and the tools are mature. Mender,3 RAUC,4 and OSTree5 write the new image to an inactive slot while the robot works, hold the reboot until it docks, and fall back to the old slot if the new one fails to boot. That proves the system starts. It says nothing about whether the robot behaves, and it only works because the robot can stop.

2. Deterministic, can’t pause: swap between control ticks #

When a machine cannot pause for a reboot, A/B slot swaps are no longer enough. A flight controller must meet a deadline every few milliseconds, so the update has to happen while the loop keeps running. If the update can’t wait until landing, dynamic software updating patches code in place,6 and research schedulers like NeRTA fit each patch into the idle time between control ticks so no deadline is missed.7 The code is still deterministic, so a bad patch still tends to fail loudly.

3. Learned, can pause: staged model swap #

Keep the pause but replace deterministic code with a learned model, and the loud failure disappears. A new model can boot cleanly and still behave worse, so a successful boot no longer counts as proof. Teams ship models separately from firmware, which avoids an OS reboot, and stage them in a ROS 2 lifecycle node8 or a Greengrass component.9 The model warms up while the robot keeps working and swaps in when the robot goes idle. The rest of the fleet gets it only after it passes replay, simulation, and a small canary group, because pausing gives you time to validate before committing.

4. Learned, can’t pause: shadow mode and safety monitor #

When the machine cannot pause, you also lose that window to validate. Here, both constraints apply at once: a model that can fail quietly, on a machine that cannot stop. The swap itself borrows from case 2: the new model loads alongside the running one and takes over at a control-tick boundary. Handing over safely takes two more steps.

First, where onboard compute and power headroom allow, the new model runs in shadow mode, reading live sensor data without controlling anything so its outputs can be compared against the active controller. This catches live distribution shift, though like offline replay it remains open-loop: the shadow model never drives the trajectory it observes. Because shadow mode can’t close the loop, a safety monitor bounds what the model can do once it takes control. In the Simplex design, a small verified monitor hands control to a trusted fallback controller whenever the model nears a limit.1011 Control barrier functions do the same job more gently, adjusting each command only as much as needed to stay safe.12

The Takeaway #

Each case adds a layer without replacing the last. Firmware discipline still protects the image on disk, scheduling decides when the swap happens, shadow mode screens the model before it takes control, and the safety monitor catches what screening missed.

References #


  1. Ross, S., Gordon, G. J., & Bagnell, J. A. (2011), “A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning (DAgger),” AISTATS (PMLR). ↩︎

  2. de Haan, P., Jayaraman, D., & Levine, S. (2019), “Causal Confusion in Imitation Learning,” NeurIPS (arXiv:1905.11979). ↩︎

  3. Mender State Scripts: Customizing OTA update lifecycle hooks and reboot gating. ↩︎

  4. RAUC Documentation: Safe and secure embedded Linux updates with A/B slot verification. ↩︎

  5. OSTree Documentation: Atomic, versioned filesystem tree deployments with rollback. ↩︎

  6. Hicks, M., & Nettles, S. (2005), “Dynamic Software Updating,” ACM TOPLAS (PLUM @ UMD). ↩︎

  7. El Yaacoub, A., et al. (2023), “Scheduling Dynamic Software Updates in Mobile Robots (NeRTA),” ACM TECS (Repository). ↩︎

  8. ROS 2 Managed Lifecycle Nodes: Deterministic state transitions for staging and activating nodes. ↩︎

  9. AWS IoT Greengrass V2 ML Components: Decoupled model and runtime component deployments at the edge. ↩︎

  10. Sha, L. (2001), “Using Simplicity to Control Complexity,” IEEE Software (DOI). ↩︎

  11. Desai, A., et al. (2019), “SOTER: A Runtime Assurance Framework for Programming Safe Robotics Systems,” IEEE/IFIP DSN (arXiv:1808.07921). ↩︎

  12. Ames, A. D., et al. (2019), “Control Barrier Functions: Theory and Applications,” European Control Conference (arXiv:1903.11199). ↩︎

Santiago Hurtado
Author
Santiago Hurtado
Turning hardware into software-defined fleets.

Was this article helpful?