Skip to content
John Hodge

← Projects

Helicopter apprenticeship-learning simulator

Problem

The Stanford autonomous-helicopter result (Abbeel, Coates & Ng, IJRR 2010) is a landmark in machine learning for physical systems: a helicopter that flies airshow aerobatics by learning the intended maneuver from imperfect human demonstrations, identifying its own dynamics from flight data, and tracking the result with optimal control. These ideas usually live in equations and offline experiments, which makes them hard to feel.

Approach

This is a browser simulator that makes the three pillars tangible and interactive. A rigid-body flight model (the paper’s Eq. 1, integrated with RK4 over a unit quaternion) runs live with a stylized 3D view, manual flight, and telemetry. An apprenticeship-learning layer recovers a clean intended trajectory from noisy, time-warped demonstrations with an EM loop (dynamic time warping plus a Kalman smoother). A system-identification layer re-learns the dynamics coefficients from flight logs by linear least squares. An LQR autopilot holds hover and tracks aerobatic maneuvers, and recovers from wind gusts. Everything is in TypeScript, with unit tests pinning the physics and the learning.

Result

A guided, flyable demonstration of how physics, learning, and control combine on one system: fly it by hand, watch EM converge on a figure-eight about 92% cleaner than a naive average, and watch system identification recover the dynamics to within a couple of percent. The write-up walks through each pillar; the live demo runs in the browser and the code is on GitHub.

View code Live demo