Model Predictive Control: Drone Trajectory Planner
Interactive Model Predictive Control simulator: a quadrotor replans a sampled control horizon in real time (MPPI) to track a reference path while avoiding an obstacle, with live tracking error and planning-cost readouts.
This simulator visualizes Model Predictive Control (MPC) as it actually runs onboard a real quadrotor: instead of committing to one fixed flight plan, the controller repeatedly samples a batch of candidate control sequences over a short prediction horizon, scores each rollout against a reference path and an obstacle, blends them with the sampling-based MPPI update rule, and executes only the first step before replanning from the new state. Watch the translucent predicted horizon bend around the obstacle before the drone itself arrives, and tune the horizon length, sample count and obstacle-avoidance weight to see the classic MPC trade-off between planning quality and computational cost.
Watch a quadrotor controlled by sampling-based Model Predictive Control (MPPI) replan its flight horizon in real time, tracking a reference path while bending around an obstacle before it arrives.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install