CARLA Cooperative V2X Intersection

A virtual intersection manager that replaces traffic lights with a V2X-inspired, reservation-based protocol for autonomous vehicles, built and benchmarked in the CARLA simulator.

PythonCARLA 0.9.16V2X
−51%
Avg. Crossing Time
+105%
Throughput
−51%
Queue Clearance Time
CARLA 0.9.16
Simulator

Architecture

Reservation-based intersection manager

  1. 01

    Detect

    Approach-radius check registers vehicles

  2. 02

    Message

    REQUEST / PERMIT / CROSSING / CLEARED mailbox

  3. 03

    Queue

    First-come-first-served arrival order

  4. 04

    Check conflicts

    Grant PERMIT only if intents do not conflict

  5. 05

    Clear

    Conflict box releases the reservation on exit

Key decisions

  1. DECISION 01

    Geometric approach radius instead of lane-level reasoning

    Keeps registration O(n) and makes the manager map-agnostic.

    → Works on any CARLA map without per-map logic

  2. DECISION 02

    FCFS conflict-aware ordering instead of a space-time reservation grid

    Avoids the heavier fine-grained grid used by systems like AIM.

    → O(n log n) sort per tick

  3. DECISION 03

    Coordinate vehicles instead of cycling signals

    Coordination mattered more than raw speed: even at half speed it beat the signal.

    → -51% crossing time, +105% throughput

Architecture

Intersection Manager: the central decision-maker. It maintains a First-Come-First-Served queue, infers path conflicts from each vehicle's declared intent (straight/left/right), and grants PERMIT messages only when it's safe to proceed.

Vehicle Agent: built on CARLA's BasicAgent, overridden to report state continuously, obey PERMIT/stop decisions, and otherwise drive normally once cleared.

A lightweight mailbox communication layer stands in for real V2X hardware — vehicles publish REQUEST/INTENT/STATE messages, the manager responds with PERMIT/CROSSING/CLEARED — modeling the interaction pattern without needing a real DSRC/C-V2X stack.

Algorithms

Vehicle detection uses a simple geometric approach-radius check rather than lane-level reasoning, keeping registration O(n) and making the system map-agnostic.

Permission assignment is FCFS conflict-aware: vehicles are ordered by arrival time, and each is granted passage only if its declared intent doesn't conflict with currently active vehicles — an O(n log n) sort per tick, versus the much heavier fine-grained space-time reservation grid used by systems like AIM (UT Austin).

An axis-aligned conflict box around the intersection tracks each vehicle's active/cleared lifecycle — entering the box marks a vehicle active, exiting and clearing 75% of the approach radius marks it cleared and releases its reservation.

Results

Benchmarked head-to-head against a fixed-cycle traffic signal: 51% lower average crossing time (2.56s → 1.25s per vehicle), 105% higher throughput (23.4 → 48 cars/min), and 51% faster total clearance time for a 16-vehicle queue (41s → 20s).

Notably, even running vehicles at half speed, the V2X manager still cleared the queue faster than the signal-based baseline at full speed — coordination mattered more than raw vehicle speed.

Limitations

Single-intersection only, fully cooperative traffic assumed (no human drivers, pedestrians, or cyclists), and communication is modeled as instantaneous and lossless — none of the physical-layer realism of real V2X hardware.

Group project at USC with 3 teammates (Shahid Shaikh, Hitansh Surani, Harshal Dave).

↑↓ navigate↵ openesc close