Autonomy City: learning how self-driving cars see
I kept reading about Tesla vs Waymo and couldn't picture what the cars actually see. So I built a little city in the browser where a car drives itself, and you can flip between 3 different ways of seeing the same street. Click below and try it.
▶ Play Autonomy City Runs in your browser. Use a laptop, you need a keyboard.
Quick disclaimer first. This is NOT Tesla's, Waymo's, or Waabi's software. It's my simplified version, based on what they say publicly. They have nothing to do with it.
Stack for the nerds: TypeScript + Three.js for the city, Rust compiled to WebAssembly for the lidar rays, and a Python pipeline that trains small models on what the cars record.
Same street, 3 ways of seeing it
Press F1, F2, or F3 to switch. Each mode also has its own planner, so the car drives differently depending on what it's allowed to see.
F1 – Tesla-style (cameras only)
Tesla says it doesn't need lidar, radar, or detailed HD maps. So this car only gets cameras. It draws boxes around what it sees, builds a rough picture of what's around it, and follows the nav route kind of like you following Google Maps.
The weakness shows up fast: if the camera can't see something, the car doesn't know it's there. Put a pedestrian behind a parked car (press 2 in the game) and watch.
F2 – Waymo-style (lidar + radar + HD map)
Waymo's 6th gen car has 13 cameras, 4 lidars, and 6 radars. That's a lot of hardware. It also only drives where it's already mapped the streets in detail. In the game you get a full 360° lidar scan around the car, radar pings, and it all gets combined into one set of boxes. It drives on a pre-built map of the lanes instead of figuring out the road live.
I got this one wrong at first. A lidar scan isn't instant, and the car keeps moving while it's scanning. My first version just drew the points wherever the car was right now, so dots slid under the car and trailed behind it. Real self-driving stacks have the same problem, and the fix is to place each scan where the car was when it took it.
F3 – Waabi-style (predicting the future)
Waabi calls itself "AI-first" and trains a ton in its own simulator. Here the car turns lidar into a top-down grid, predicts that grid 1–3 seconds ahead, and picks a path from a bunch of options based on where things will be. It also replays the same moment with small changes, like the jaywalker stepping out a bit earlier, to see when the plan breaks.
The data loop
From what these companies say publicly, a lot of their effort goes into the loop that makes the car a little better every week, so I built a small version of that too:
- Record drives (in the browser, or headless in Node)
- Pull out the interesting moments → takeovers, missed detections, near-misses
- Label them with a fake labeling vendor that makes mistakes on purpose, then QA to catch them
- Split by scenario so you're not testing on stuff you trained on
- Train a perception model and a driving policy in PyTorch
- Only ship the new model if it beats the old one, then export it to ONNX
The perception model got an F1 of 0.99 vs 0.62 for my hand-written rules. That number means very little: it's simulated data with clean shapes, and everything in the test set was close to the car. Real roads are much harder. I built this to learn how the loop works.
What I learned
- The planner can only react to what the sensors give it, so the sensor choice shapes everything after it.
- HD maps make driving easier, but you're stuck wherever you've mapped. Waymo city by city, Tesla anywhere (in theory).
- Spotting a pedestrian turned out to be much easier than guessing whether they're about to step out.
- I spent more time on the data loop (mining, labeling, QA and deciding what ships) than on any one model, and I suspect that's true at the real companies too.
It's similar to what I see building AI agents for clients at Rocket Agency: the model is one piece, and most of my time goes into testing, fixing the data and deciding when it's safe to put in front of real people.
If you drive it around and something breaks, I'd like to hear about it. DM me on X.