AutoMerge Team

Safe Driving

Graduation Project sponsored by SwiftAct Company

Project Overview

The CARLA Platoon System is an advanced autonomous vehicle platooning implementation using the CARLA simulator (version 0.9.14). This system enables multiple vehicles to form a coordinated convoy where a lead vehicle guides the platoon while follower vehicles maintain consistent gaps and follow the same trajectory.

Core Objectives

  • Implement a leader-follower platoon system with the lead vehicle in autopilot mode
  • Enable vehicle-to-vehicle (V2V) communication for coordination
  • Develop adaptive control algorithms for maintaining safe distances
  • Create realistic simulation scenarios within Town06_Opt map
  • Design a modular architecture for easy expansion and testing
CARLA Platoon Visualization

Project Objectives

The primary goal of our AutoMerge project is to develop and implement advanced vehicle platooning systems with a special focus on the critical merging process.

Enhanced Fuel Efficiency

When vehicles move in close formation, air resistance is significantly reduced for following vehicles, resulting in substantial fuel savings and reduced emissions.

Improved Safety

Automated systems react faster than human drivers. Electronically linked vehicles can brake and accelerate in perfect synchronization, drastically reducing rear-end collision risks.

Increased Road Capacity

By safely reducing the gaps between vehicles, more vehicles can be accommodated on existing roads, improving traffic flow and reducing congestion.

Driver Comfort

Follower vehicles in the platoon allow drivers to relax as the system manages speed and spacing, creating a more comfortable driving experience.

Merging Process Excellence

The merging process is one of the most complex maneuvers in platooning systems. Our project focuses on perfecting these scenarios:

  • Vehicle joining a platoon
  • Vehicle leaving a platoon

Coordination & Stability

Our algorithms ensure effective coordination between vehicles for precise timing of merges, creating necessary gaps, and synchronizing speed adjustments for successful platooning operations.

Our Mission

Our project aims to develop merging algorithms that are absolutely safe, smooth, and efficient, preserving all the core benefits of platooning systems (efficiency, safety, road capacity) while enabling practical, widespread adoption of this technology on public roads.

Project Architecture

The system is organized into five main modules working together to enable advanced vehicle platooning capabilities:

Simulation Module

Interfaces with CARLA and manages the simulation environment

  • World management
  • Environment settings
  • Sensor data processing

Control Module

Manages vehicle behavior and platoon dynamics

  • Speed control
  • Steering control
  • Platoon gap management

Communication Module

Handles V2V information exchange

  • Message broadcasting
  • Protocol handling
  • Data serialization

Scenarios Module

Implements specific testing scenarios

  • Basic platoon
  • Highway merge
  • On-ramp merge
  • Follower exit

Utils Module

Provides helper functions and shared utilities

  • Coordinate utilities
  • Data visualization
  • Configuration tools

Module Details

Simulation Module

The Simulation module interfaces with CARLA and manages the simulation environment. It handles the creation and management of the simulation world, weather conditions, and other environment settings.

Key Components:

  • CARLA world management
  • Weather and environment settings
  • Sensor data processing
  • Simulation lifecycle management
  • Performance monitoring

Control Module

The Control module handles vehicle behavior, adjusting speed and steering to maintain platoon formation. It includes sophisticated algorithms for both longitudinal and lateral control.

Key Components:

  • Longitudinal controller (speed/distance)
  • Lateral controller (steering/path following)
  • Platoon gap management
  • Leader vehicle speed control
  • Safety intervention system

Communication Module

The Communication module simulates V2V communication between platoon vehicles, allowing them to share position, velocity, and intention data in real-time.

Key Components:

  • Message broadcasting system
  • Data serialization/deserialization
  • Communication protocol implementation
  • Connection management

Scenarios Module

The Scenarios module implements specific testing scenarios for the platoon system, creating realistic situations to evaluate performance.

Key Components:

  • Basic platoon scenario on curved roads
  • Highway merge scenario
  • On-ramp merge scenario
  • Follower exit scenario
  • Scenario configuration
  • Event triggering
  • Performance metrics collection

Utils Module

The Utils module provides shared functionality used across other modules, offering common services and algorithms.

Key Components:

  • Coordinate transformations
  • Logging functionality
  • Configuration management
  • Path planning algorithms
  • Visualization tools

Implementation Phases

Our development journey followed a structured approach with six key phases, each building upon the previous to create a comprehensive platooning system.

100%
01

Environment Setup

Initial Stage

Establishing the foundational elements of the system including simulation environment and basic architecture.

Set up CARLA 0.9.14 simulation environment
Create configuration files (config.py, settings.py)
Establish base project structure
Implement basic CARLA connection
100%
02

Vehicle Management

Foundation

Creating the basic vehicle control and positioning systems for coordinated movement.

Implement leader vehicle spawning with autopilot
Develop follower vehicle spawning with relative positioning
Create basic longitudinal control for maintaining gaps
Implement basic lateral control for path following
100%
03

Communication System

Coordination

Enabling information sharing between vehicles in the platoon for coordinated movement.

Design V2V communication protocol
Implement message broadcasting between vehicles
Create data structures for vehicle state sharing
Develop communication error handling
100%
04

Advanced Control Algorithms

Intelligence

Refining the control systems for complex scenarios and adaptive behavior.

Enhance longitudinal control for variable speeds
Improve lateral control for curves and turns
Implement adaptive gap control based on speed
Develop safety mechanisms for emergencies
100%
05

Scenario Implementation

Testing Environments

Creating realistic testing situations for evaluation and demonstration.

Create basic platoon scenario (road following with curves)
Implement highway merge scenario
Develop on-ramp merge scenario
Create follower exit scenario
95%
06

Testing & Optimization

Finalization

Ensuring system reliability and performance through rigorous testing.

Comprehensive testing of all modules
Performance optimization
Documentation finalization
Project demonstration preparation

Scenarios

Basic Platoon Scenario

Basic platoon following a path with curves and turns. This scenario demonstrates the fundamental capabilities of the platoon system.

3 Vehicles
60 km/h
10m gap

Highway Merge Scenario

Vehicle merging into an existing platoon on highway. This scenario tests the platoon's ability to adapt to new vehicles joining the formation.

4 Vehicles
100 km/h
Dynamic spacing

On Ramp Merge Scenario

Vehicle merging into an existing platoon from an on-ramp. This scenario tests the platoon's ability to adjust to vehicles joining from access points.

3+1 Vehicles
80 km/h
V2V Communication

Follower Exit Scenario

A follower vehicle leaving the platoon formation. This scenario demonstrates the platoon's ability to maintain stable formation as vehicles depart.

4→3 Vehicles
90 km/h
Gap re-adjustment

Project Structure

Project Structure
Project Root
5 folders, 3 files
config.py
Configuration parameters
settings.py
CARLA simulation settings
main.py
Main entry point
communication/
3 files
__init__.py
v2v_manager.py
V2V communication manager
message_handler.py
Message processing
control/
5 files
__init__.py
platoon_controller.py
Main platoon control logic
merge_controller.py
Merge control logic
longitudinal.py
Speed and distance control
lateral.py
Steering and path following
simulation/
4 files
__init__.py
carla_manager.py
CARLA connection management
world_manager.py
World state manipulation
vehicle_manager.py
Vehicle spawning and configuration
scenarios/
6 files
__init__.py
scenario_manager.py
Scenario execution management
basic_platoon.py
Basic platoon scenario
highway_merge.py
Highway merge scenario
on_ramp_merge.py
On-ramp merge scenario
follower_exit.py
Follower exit scenario
utils/
5 files
__init__.py
coordinate_utils.py
Coordinate transformations
path_planning.py
Path planning algorithms
visualization.py
Visual data presentation
logger.py
Logging functionality
5
Modules
27
Python Files
~14,764
Lines of Code & Comments
4
Scenarios

Video Demonstrations

Experience our advanced platoon system in action through these high-quality video demonstrations showcasing various real-world scenarios and tests.

Our Team

Meet the talented team behind the AutoMerge project:

Ragab Hassan Elkattawy

Ragab Hassan Elkattawy

Team Mentor

Ayman Mohamed Elashry

Ayman Mohamed Elashry

Team Leader

Hossam Elmaghrabey

Hossam Elmaghrabey

Team Member

Mahmoud Eid

Mahmoud Eid

Team Member

Tarek Masoud

Tarek Masoud

Team Member

Ibrahim Ashour

Ibrahim Ashour

Team Member

Abdelrahman Medhat

Abdelrahman Medhat

Team Member

Your Feedback

We value your opinion! Please share your thoughts on our project and any suggestions you might have.