April 10, 2026

PID vs RL: choose your fighter

Simulating a 2D Quadcopter from Scratch

From couch drone to sky racer? Readers split: math geeks vs “make it fly” crew

TLDR: A maker built a simple 2D drone simulator to prep for future control and AI experiments, inspired by a pro-level drone racing study. Comments erupted into a friendly duel: classic PID stabilization versus reinforcement learning, with jokes about “oscillating to death” highlighting why good sims matter before real flights.

A blogger drops a back-to-basics guide to simulate a 2D drone—think two propellers, gravity, and a lot of math—and the crowd instantly splits into camps. The author says they spent six months replicating the “Champion‑level drone racing” RL paper and wants to document the journey. Cue applause from the “learn the physics first” crowd and eye‑rolls from the “show me flips” crew.

The hottest thread? Old‑school PID vs. shiny Reinforcement Learning. One reader asks if there’s a homegrown PID (a simple autopilot) to keep the drone from wobbling, because the real boss battle is tuning it without “oscillating to death.” Others argue: start with 2D to build intuition; critics fire back: 2D is training wheels, bring on 3D and real‑world chaos. Meanwhile, math fans cheer the clean state‑space equations; code‑first folks beg for more Python and less trigonometry.

Jokes fly faster than the drone: “It’s all sin, cos, and vibes,” “two forces, one headache,” and “state‑space? more like state‑of‑confusion.” But beneath the memes, there’s consensus: a solid sim is step one before any controller—or AI hotshot—can keep it in the air. Bottom line: humble 2D sim, massive debate energy, and everyone’s secretly bookmarking it.

Key Points

  • The article derives a planar quadcopter’s equations of motion using Newton–Euler mechanics.
  • Coordinate system is defined with y horizontal, z vertical, and φ as rotation in the yz-plane (positive counterclockwise).
  • Thrust forces F1 and F2 are resolved to yield mÿ = −(F1+F2) sinφ, mz̈ = (F1+F2) cosφ − mg, and Iφ̈ = (F1−F2)ℓ.
  • Inputs are reparameterized as u1 = F1+F2 and u2 = F1−F2, simplifying the dynamics for simulation.
  • A first-order state-space model with state x = [y, z, φ, ẏ, ż, φ̇]ᵀ is implemented in Python for numerical simulation.

Hottest takes

"I've spent the last six months replicating the paper 'Champion-level drone racing using deep reinforcement learning'" — daww
"Did you implement your own PID controller for stabilization?" — kabir_daki
"tuning the gains without it oscillating to death" — kabir_daki
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.