← Back to Projects

Autonomous Vehicles · State Estimation · Perception

Perception-Aware Autonomous Vehicle

A term of coursework on the Quanser QCar 2, building from raw IMU characterization up to a vehicle that plans a route and obeys stop signs and traffic lights.

Course EE 471 — Planning and Control for Autonomous Vehicles, Prof. Siavash Farzan
Timeline March – June 2026
Platform Quanser QCar 2, simulation and hardware
Extended Kalman Filter Dead Reckoning Stanley Control PI Speed Control Camera Calibration LiDAR Occupancy Grids RGB-D Perception

A note on authorship

This was structured coursework, not independent work. The course framework, starter code, and hardware interface classes were written by Prof. Siavash Farzan of the Cal Poly Electrical Engineering Department, who deserves credit for that material. Students filled in designated algorithm functions inside that scaffolding.

What this page documents is therefore the topics I studied and the systems I got working — not a claim of having authored the surrounding codebase. The engineering understanding is mine; the framework it runs inside is his.

What the term covered.

Each stage built on the one before, ending with a vehicle that drives a planned route under traffic law.

01

IMU interfacing and noise characterization

Reading the inertial sensor over its interface, logging it at rest, and characterizing what the signal does when nothing is moving. The gyroscope has a bias that drifts and a random walk on top of it; quantifying both as a statistical model is what lets a filter downstream decide how much to trust the sensor versus its own prediction.

02

State estimation

Dead reckoning integrates wheel odometry and heading forward, which works briefly and then drifts without bound. The extended Kalman filter fixes that by predicting with the motion model and correcting against GPS, linearizing the non-linear model at each step. Fusing a separate heading measurement keeps yaw from being the weak axis.

03

Speed and steering control

Two loops that do not talk to each other. A PI controller regulates speed against a reference, integrating away the steady-state error a proportional term alone leaves behind. Steering is geometric — the Stanley controller drives both the heading error and the cross-track error of the front axle to zero, which is what keeps the car on the line rather than merely parallel to it.

04

Camera calibration and line detection

A camera lens bends straight lines, so the first job is recovering the intrinsics and distortion coefficients from a checkerboard of known geometry. Only once the image is undistorted does line detection mean anything — a lane edge found in a warped frame maps to the wrong place in the world.

05

LiDAR mapping

Raw LiDAR gives ranges and bearings; an occupancy grid turns them into a map the planner can use. Each scan marks cells along a ray as free and the cell at the return as occupied, accumulated over time so noise averages out and the static structure of the room emerges.

06

Perception-aware driving under traffic law

Everything above, plus the rules. Detections carry a class and a range, and a finite-state machine decides what to do with them — approach, slow, stop, wait, proceed — so the car obeys a stop sign and a red light instead of merely noticing them.

What the vehicle carries.

Annotated view of the Quanser QCar 2 identifying its RPLidar, Intel RealSense depth camera, onboard compute, 360-degree CSI cameras, LCD, encoder-equipped drivetrain, and IMU.
The QCar 2 platform and its sensor suite — the hardware every stage below runs on.

The system working.

Occupancy grid map with obstacles in grey, showing the measured vehicle path in red closely following a green reference path around a rounded rectangular circuit.
LiDAR-built occupancy grid with the driven path overlaid against the reference.
Camera view of a lab track with a stop sign and traffic light, each outlined by a detection box labelled with its class and estimated distance.
Traffic-light and stop-sign detection with range estimates, running on the physical track.
Simulated street view with a checkerboard calibration target, detected grid lines drawn in red and the recovered coordinate axes at the target centre.
Camera calibration against a checkerboard target, with the recovered pose axes drawn at its centre.

The vehicle driving.

End-to-end runs in simulation and on the physical track. Simulation lets the planner and finite-state machine be exercised safely and repeatably; the physical runs are where sensor noise, tyre slip, and lighting stop being theoretical.

Perception and traffic-sign logic — simulated cityscape navigation.
Physical run 1 — end-to-end on the track.
Physical run 2.