Making Intelligent Traffic
Jul 11, 2022

- Team of 5 (BSc CS)
- Course: CS-358 Making Intelligent Things
- Grade: 5.75 / 6
TL;DR
- Built a multi-car intelligent traffic system with camera-based localization and Bluetooth-controlled, 3d-printed cars.
- Cars demonstrated follow-the-leader, passenger pick-up with GUI, and collision-aware path planning.
- System integrated AprilTags, Arduino, Bluetooth, and computer vision into a cohesive simulation.
- Team project (5 students), grade 5.75 / 6.
At a glance
- Role: Robotics engineer (team of 5)
- Timeline: Apr–Jul 2022 (10 weeks)
- Context: EPFL course project (CS-358: Making Intelligent Things)
- Users/Stakeholders: Students, course staff
- Scope: Path planning, AprilTags localization, integration with Arduino-controlled cars, GUI development
Problem
Urban mobility research often requires safe indoor testbeds for traffic coordination. Challenges we tackled:
- Localization of multiple cars indoors, where GPS is unavailable.
- Collision avoidance at intersections in multi-car scenarios.
- Integration of hardware (cars, sensors) and software (planning, GUI) under real-time constraints.
The question: Can we create an affordable, scalable lab-scale traffic system that demonstrates intelligent coordination between multiple cars?
Solution overview
We built a camera-guided, multi-car traffic system where:
- AprilTags serve as indoor GPS for localization.
- Bluetooth (HC-05) connects each Arduino car to the central controller.
- Path planning algorithms guide cars through waypoints while negotiating intersections.
- GUI interface allows user interaction, e.g. spawning passengers.
- 3D-printed chassis provide robust hardware for the cars.
Architecture
- Hardware: Arduino-based cars with brush DC motor, servo steering, Bluetooth module.
- Software: Python backend for localization, feedback loop, and planning.
- Localization: Ceiling-mounted camera detects AprilTags → OpenCV computes positions.
- Control loop: Central controller sends commands via Bluetooth to adjust speed and steering.
- Planning: Dijkstra’s algorithm for pathfinding, plus intersection negotiation.
- GUI: User can spawn passengers and trigger re-planning.
Data
- Input: Video stream from ceiling camera.
- Features: AprilTags on each car provide ID + pose.
- GUI events: Passenger spawn requests, goals.
- Outputs: Motor/steering commands sent over Bluetooth to each car.
Product & UX
Demonstrations
-
Four-vehicle path planning Video – cars follow random waypoints, avoiding collisions at intersections.
-
Follow the leader Video – one car is manually controlled, another follows autonomously using waypoints.
-
Passenger pick-up Video – clicking in the GUI spawns a passenger; car replans path to pick up and drop off.
System & Operations
- Stack: Python backend (planning, localization), Arduino firmware (motor + steering), Bluetooth communication.
- Hardware design: Custom 3D-printed chassis (Fusion 360), PETG material. Differential design reduced wheelbase for tighter turns.
- Electronics: Arduino Uno, L298N motor driver, HC-05 Bluetooth, servo steering, DC motor.
- Control loop: Real-time localization from AprilTags → commands issued via Bluetooth.
- Simulation vs hardware: Virtual cars tested first, then real cars executed same algorithms.
Impact
- Demonstrated that low-cost robotics platforms can simulate intelligent traffic in lab settings.
- Showcased intersection negotiation and passenger pick-up planning as key multi-car coordination tasks.
- Showed potential as a prototype for future teaching and research platforms in robotics courses.
What I learned
- Integrating computer vision + embedded systems into a single feedback loop.
- Practical challenges of Bluetooth communication in multi-agent systems.
- Designing 3D-printed hardware for stability and precise turns.
- Value of incremental testing: simulation → hardware deployment.
Future Work
- Add more realistic city maps with traffic lights and lane constraints.
- Introduce dynamic obstacles and pedestrians.
- Explore V2V (vehicle-to-vehicle) communication instead of central control.
- Scale up to larger fleets for stress-testing intersection algorithms.
References
- OpenCV AprilTags detection.
- Arduino documentation (HC-05 Bluetooth, L298N motor control).
- Dijkstra’s algorithm references for path planning.
- Fusion 360 + Prusa 3D printing guides.