Self-Driving Cars: Start Here
How a self-driving car works, from sensors to the steering wheel; the levels of automation; why the industry tests in simulation; the simulator you will use all course; and the full course plan.
Softmaxima Simulator StudioWrite your car in Python, with as many files and trained networks as it needs, and watch it drive. In your browser, nothing to install.OpenIn plain words
A self-driving car does what you do when you drive, in the same order: look around, work out where you are, decide what to do, and turn the wheel and press the pedals. This course builds each of those, one at a time, in a simulator that runs in your browser.
By the end of this topic you will be able to say what each part of a self-driving car does, and drive a lap of the simulator yourself.
Start with: the demo Try it: drive a lap yourself.
What you will build
In this course you build the software for a car that drives itself, and you test every part of it in a driving simulator that runs in this page. You do not need a car, a robot or any hardware. You write the car's "brain" in Python, press Run, and watch it drive, or crash, and the simulator scores it.
By the end, your car will follow lanes, see other cars, people and traffic lights with neural networks you design and train from scratch, know where it is, plan a safe path, and pass an automatic test track of 20 scenarios.
This is also how the industry works. Self-driving companies drive far more kilometres in simulation than on real roads, because simulation is safe, cheap, repeatable, and can create rare, dangerous situations on demand: a child running out between parked cars, a truck running a red light, sun glare at the worst moment.
The self-driving stack
Every self-driving system, from a university project to a robotaxi, is built from the same layers. Step through them.
Interactive: this part runs in your browser.
Levels of automation
SAE International defines six levels of driving automation, from 0 (no automation) to 5 (drives anywhere, in any conditions, with no human). The key question is who must watch the road.
| Level | What the car does | Who watches the road |
|---|---|---|
| 0–1 | warnings, or help with steering or speed | the driver |
| 2 | steering and speed together | the driver, all the time |
| 3 | drives itself in limited conditions, such as motorway traffic jams | the car, but the driver must take over when asked |
| 4 | drives itself with no one in the driver's seat, inside a defined area and conditions | the car |
| 5 | drives itself everywhere a human could | the car |
Most driver-assistance systems sold today are Level 2. Robotaxis operating in some cities are Level 4. Nobody has Level 5.
Try it: which level?
Sort each system into its level.
Interactive: this part runs in your browser.
Meet the simulator
The simulator is a top-down world: a road 7 m wide with two lanes. We drive on the left, as in Australia, so your car's target is the centre of the left lane (the faint blue dashed line). The yellow dashed line is the middle of the road: cross it and you are in the oncoming lane.
- Three tracks: an Oval, a City loop and a Hill road with tighter bends.
- The car follows the same equations as a real car at normal speeds (next topic), with real limits: the steering wheel can only turn so fast, and the tyres can only grip so much.
- The trail behind the car turns from green to red as it drifts from the lane centre, and the chart below shows the error over time.
Drive a lap yourself first. It is harder than it looks, and it shows you exactly what the controller you write next has to do.
Where your code goes: every controller you write is one Python function, control(car), and the next topic, The Simulator: Run Your Code, shows how to run it: in the page with nothing to install, or on your own computer.
Try it: drive a lap yourself
Choose a track and press Start. Use the arrow keys, or the buttons on a phone.
Interactive: this part runs in your browser.
How to use this course
This is an intermediate course (Part 6 is advanced), but there is a gentle way through it. Every section has a label:
- Beginner: the ideas, in words and pictures. Read these.
- Try it: demos that run in the page. Play with these; they are the heart of the course.
- Intermediate · Maths: the equations behind the ideas.
- Code: Python you can run, in the page or in Google Colab.
- Advanced: deeper detail that real systems need.
The beginner route: next to Show at the top of each topic, turn off Intermediate · Maths, Code and Advanced. You will see only the explanations and the demos, and you can still follow every idea and finish the capstone. Your choice is remembered on every page. Come back for the maths and code later, one topic at a time.
No training needed: every demo that uses a neural network comes with an example network that already works. Training your own in Colab is an optional level-up.
Are you ready? A quick check
Try these four questions. Click a question to see the answer. If one feels new, the link takes you to the lesson that covers it.
1. Python. What does this print? for x in [1, 2, 3]: print(x * 2)
2, 4 and 6, one per line. If loops are new, start with Loops and Functions.
2. Vectors and angles. A car drives at 10 m/s, heading 30° from east. How fast is it moving east?
10 × cos 30° ≈ 8.7 m/s. If that needs a refresher, see Vectors.
3. Probability. A GPS reading has an error with a standard deviation of 3 m. Is an error of 10 m common or rare?
Rare: more than three standard deviations away, so it happens far less than 1% of the time (for a bell-shaped error). See Probability & Distributions.
4. Machine learning. What does "training a model" mean, in one sentence?
Adjusting its numbers (weights) a little at a time, so its answers on example data get closer to the right answers; see Gradient Descent and Neural Networks.
Not sure about some of them? You can still start: Part 1 needs only a little Python, and each topic opens with the idea in plain words.
The full course plan
The course has six parts and about 90 hours of learning. Parts 1 to 5 build a complete car, ending with a capstone in which it must pass 20 test scenarios and a topic that packs it into one Python project you can run in the CARLA simulator. Part 6 is for university-level students: the modern perception methods used in research and industry, on real datasets.
| Part | Topics | What you train or build |
|---|---|---|
| 1. How a self-driving car works | the stack; the simulator and how it runs your code; how a car moves (the bicycle model); PID control; pure pursuit, Stanley and model predictive control | steering and speed controllers that drive the simulator |
| 2. Seeing the road | cameras and lidar; camera calibration and bird's-eye view; classical lane finding; recording labelled data from the simulator; traffic-light and sign classification; object detection; lane and drivable-area segmentation; depth from one camera; tracking; driving by imitation; robustness at night and in rain; fine-tuning versus training from scratch; making models fast enough to run live | a CNN classifier, a YOLO-style detector, a U-Net, a depth network and a PilotNet-style driving network, all written and trained from scratch on data you record, then loaded into the simulator |
| 3. Knowing where you are | Kalman filters; particle filters; sensor fusion of GPS, motion sensors and landmarks; occupancy grids, maps and SLAM basics | a localiser that keeps the car on its map when GPS drops out, and a lidar map |
| 4. Deciding what to do | path planning with A* and hybrid A*; behaviour at junctions, lights and lane changes; predicting other road users; reinforcement learning for driving | a parking planner, a lane-change planner, and RL agents trained in your browser and in Colab |
| 5. Making it safe | why miles alone cannot prove safety; scenario testing; safety standards (ISO 26262, SOTIF) and the law in simple terms; capstone | a complete autonomous car that must pass 20 test scenarios |
| 6. Modern perception (advanced) | real datasets (KITTI, BDD100K, nuScenes) and mAP; transfer learning; stereo and self-supervised depth; lidar and 3D detection; bird's-eye view and sensor fusion; learned motion prediction; end-to-end driving, world models, vision-language models and uncertainty | a fine-tuned YOLO, a stereo depth system, a lidar 3D detector, Lift-Splat-Shoot, a transformer predictor |
What you need first: Python, Maths for AI and Machine Learning. Part 2 also uses Deep Learning and Computer Vision. The heavier training in Part 2 runs in free Google Colab; everything else runs here.
Quiz
1. Which layer of the stack turns the planned path into steering and throttle commands?
2. A system steers and keeps distance on the motorway, but the driver must watch the road at all times. Which level?
3. Why do self-driving companies test so much in simulation?
📚 Further reading
Trusted, mostly free sources: official documentation, well-known textbooks and courses. When you want to confirm or go deeper on anything here, start with these.
- SAE J3016: Levels of Driving Automation ↗ the standard that defines Levels 0 to 5
- Thrun et al. (2006): Stanley, the robot that won the DARPA Grand Challenge ↗ how Stanford's car worked, including its steering controller