Thanks to visit codestin.com
Credit goes to github.com

Skip to content

justinfababier/AIN

Repository files navigation

Automatic Intersection Navigation (AIN)

This repository contains the software for the Automatic Intersection Navigation (AIN) system, developed by the Connected and Automated Vehicle (CAV) Subteam for the University of California, Riverside's entry in the EcoCAR EV Challenge.

The AIN system is a core component of the vehicle's longitudinal control, enabling the team's 2023 Cadillac LYRIQ to autonomously and efficiently navigate signalized intersections using Vehicle-to-Everything (V2X) communication.


System Overview

The primary function of the AIN system is the Eco-Approach and Departure (EAD) application. By leveraging real-time Signal Phase and Timing (SPAT) and MapData (MAP) messages from roadside infrastructure, combined with GNSS and vehicle velocity data, the system computes an optimal, fuel-efficient speed profile for approaching and departing intersections.

Key Features:

  • V2X Integration – Decodes and processes standard SAE J2735 SPAT and MAP messages.
  • Map Matching – Precisely localizes the vehicle within intersection geometry using pyproj.
  • Green Window Estimation – Analyzes traffic signal timings to determine passable green intervals.
  • Scenario-Based Decision Making – Generates optimized velocity profiles for one of four scenarios: maintaining speed, accelerating, stopping, or coasting.

Architecture

The system is modular, consisting of three main Python subsystems integrated via RTMaps:

  1. Map Matcher (MM.py) – Matches the vehicle’s GNSS position to digital map lanes from MAP messages.
  2. Green Window Estimator (GWE.py) – Processes SPAT messages to determine available green light windows.
  3. Decision Maker (DM.py) – Core logic that identifies the driving scenario and generates the fuel-optimized target velocity profile.

Quick Start

The code in this repository is onl

Prerequisites

  • OS: Ubuntu 22.04 LTS or Windows 11
  • RTMaps (with PCAP, Python Bridge, and V2X packages)
  • Python 3.x with libraries: numpy, pyproj

Baseline Test (Simulation)

  1. Clone this repository.
  2. Open RTMaps and load the provided simulation diagram (AIN-SIL-RTMaps-Only.rtd or similar).
  3. Configure the PCAP Player block to replay a test file (e.g., V2X_Test_041525_SPaT_MAP_Gm_218.pcap).
  4. Run the diagram and monitor outputs (distance_to_arrival, target_velocity, engage_signal) in the RTMaps Oscilloscope.

Key Files

File Description
MM.py Map Matcher subsystem for vehicle localization
GWE.py Green Window Estimator subsystem for signal analysis
DM.py Decision Maker subsystem for velocity profile generation
V_c_Generator.py Simulates vehicle speed for Software-in-the-Loop (SIL) testing
GNSS_Generator.py Simulates vehicle position for SIL testing

Integration & Communication

AIN operates within the vehicle's CAV compute architecture and communicates with:

  • Cohda MK6 OBU – Receives V2X messages (SPAT/MAP)
  • Longitudinal Controller – Consumes target velocity and engagement flag
  • NavQPlus HMI – Displays system status (Standby/Active) to the driver

Testing

The system validation includes multiple levels:

  1. Individual Subsystem Testing – Isolated testing of decoders, MM, GWE, and DM.
  2. Software-in-the-Loop (SIL) – Closed-loop testing in RTMaps and RoadRunner Scenario.
  3. Hardware-in-the-Loop (HIL) – Real-time testing with Autera AutoBox and simulated vehicle dynamics.
  4. On-Road Testing – Final validation on a closed test track.

Refer to the test_data_captures/ directory for sample PCAP files.


Documentation

Full technical details, system requirements, state machines, flowcharts, and handoff instructions are available in the primary project document: AIN_Handoff_Guide_v2.0.1.pdf


Closing Comments

AIN was initially developed by Micheal Dominguez, Justin Fababier, Matthew Henson, and Samuel Park as part of their coursework for EE 175A/B (Fall 2024 – Winter 2025). During this phase, the team focused on designing and implementing the foundational architecture and core functionalities of the system.

In April 2025, Hung Nguyen joined the AIN development effort. Together with Justin Fababier, the duo carried out further development and refinement of the system. This phase emphasized enhancing performance, addressing limitations identified in the initial implementation, and extending the system’s capabilities to meet more advanced requirements.

With guidance from Professor Guoyuan Wu and the team at the CE-CERT (Center for Environmental Research & Technology of UC Riverside).


Disclaimer

This project was developed for the EcoCAR EV Challenge, sponsored by the U.S. Department of Energy, General Motors, and MathWorks.

This repository is published for personal portfolio and documentation purposes only.

All code and intellectual property within this repository remain the sole property of the UCR EcoCAR team and its developers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published