Skip to content

Xycar autonomous driving

2026.11.05~06

three vision laps and two end-to-end AI laps

METAmobility 2026 Gold AwardTeam of three · Lead

Problem

Over two days, teams take a car they are handed on site through a traffic-light start, a corridor of red cups, stopping at and weaving past AR boxes, lane driving, and the finish gate in one run, ranked by driving time plus penalties. Laps 4–5 had to be driven by an AI model, and a race-day rule change meant obstacle cars could appear on the lane several times from lap 4, each of which had to be avoided.

My part

I kept the decision code (mission state flow, image processing, steering) separate from ROS, so values were set with 29 tests that run without the car and by recomputing recorded runs. The cup corridor is driven with lane PID because the cups sit on the lane lines, and ultrasonic sensors only slow the car down. AprilTag distance bands steer the car past AR boxes, and speed is set by steering size, so the car accelerates hard only on straights and slows at once entering a corner. For laps 4–5, an end-to-end model trained with donkeycar on about 12,000 images collected while driving the car by hand (TFLite) steers from the camera image at a fixed speed, while the same obstacle detection and avoidance code from the vision laps keeps running. When the car hit obstacles it had already seen, I traced it to the official ultrasonic node reading the front and rear boards in turn with no timeout, and replaced it with a node that reads each board separately and reconnects a stalled board over USB. False obstacles from cups, gate posts, and objects beside corners were filtered by red-pixel share, gate tags, and steering size.

Result

In the final, the car ran laps 1–3 on image processing and laps 4–5 on the end-to-end model, finishing five laps in 146 seconds including penalties for second place and a Gold Award.
ROS2PythonOpenCVAprilTagPIDdonkeycarTensorFlow LiteRaspberry PiClaude Code