← All work
Reinforcement learning · Simulation · Rust · 2026

Autonomous FPV racing

A racing-drone simulator rewritten in Rust from recorded flights, and a reinforcement-learning pilot trained in it that then flies the real race.

RustPyO3PPOSystem identificationDomain randomizationPyTorch
Top-down view of the race line flown by the agent at successive training stages, getting tighter each time.
Best simulated lap at successive training stages, top-down. Early policies in light tones; the final one in blue.
1–3%lap-time error of the simulator against real flights
0.17–0.54 mposition error 1 s ahead, on flights it never saw
51.1 → 13.8 sbest lap: scripted controller → RL policy
3 / 3laps valid, no contacts, reproduced on 3 flights

The problem

Training a racing pilot by trial and error needs millions of crashes. That is only possible in a simulator, and a policy trained in a simulator only flies well if the simulator is faithful.

How it works

  1. Flightstelemetry recorded from real flights
  2. Physicsthrust, drag and rotation identified from data
  3. Residualsmall network for what the equations miss
  4. SimulatorRust, thousands of parallel environments, Python bindings
  5. PolicyPPO with randomized physics and full races
  6. Real racepolicy flies the game in real time

What made it transfer

  • Validated by trajectory, out of sample. Every version of the physics was judged on whole flights it had not been fitted to, by how far the predicted path drifts after one second.
  • A small residual network on top of the identified physics closes most of the remaining gap.
  • Training for robustness, not for the simulator. Full races with battery sag, a safety margin around obstacles and randomized physics; a separate robust evaluation picks the policy that flies.
  • Negative results kept. Correcting rotation with the network made trajectories worse; spreading battery over the race gained under 0.3 s. Both were measured and dropped.
About the data. Only our own simulator, training code and flight data are shown. Nothing from the game itself is published.