← Back to Home

Self-Driving Car — Manchester Robotics

ROS 2YOLOv8Jetson NanoOpenCVPID ControlPython

Overview

Built a scaled autonomous differential-drive car in collaboration with Manchester Robotics. The system combined ROS 2, edge computing, computer vision, deep-learning perception, feedback control, and finite-state logic into a real-time indoor driving stack.

Hardware & Software

The robot used a Jetson Nano, Manchester Robotics HackerBoard, encoder-equipped DC motors, and Raspberry Pi V2 camera. ROS 2 Humble connected the onboard hardware to perception and decision-making components developed in Python and OpenCV.

Perception

Line following:

  • Grayscale and ROI processing.
  • Morphological filtering and contour extraction.
  • Centroid-based lateral error.
  • PID steering correction.

Traffic lights:

  • HSV-based color processing.
  • Contrast enhancement and contour filtering.
  • Red/yellow/green classification.

Traffic signs:

  • YOLOv8 trained on 1,200 annotated images across four classes.
  • Transfer learning with 640 px input resolution.
  • 92.3% mAP@0.5.
  • Class-wise precision above 90%.

Autonomous Behavior

A finite-state machine combined line following, traffic lights, and sign detections into deterministic vehicle behavior: follow, slow, stop, wait, and execute sign-specific maneuvers.

Results

  • 98% track completion across 30 laps.
  • 4.2° mean heading error.
  • 95.1% traffic-light classification F1-score.
  • 92.3% mAP@0.5 for traffic-sign detection.
  • 2.8 cm RMS waypoint error at 0.25 m/s during earlier navigation testing.

Engineering Work

The project also required real hardware debugging: Jetson setup, power delivery, camera latency, wheel imbalance, PID retuning, lighting variation, and communication between the robot and external compute.