An open‑source, real‑time Adaptive Cruise Control system that uses Model Predictive Control to safely maintain vehicle distance under dynamic traffic scenarios.
Adaptive Cruise Control (ACC) is an advanced driver assistance system that automatically adjusts a vehicle’s speed to maintain a safe distance from the vehicle ahead. Traditional cruise control systems react late to sudden braking and speed changes, which can lead to unsafe driving situations.
This project presents an open‑source Adaptive Cruise Control system implemented using Model Predictive Control (MPC). The system continuously predicts future behavior of the target vehicle and computes optimal acceleration or braking commands for the controlled vehicle in real time.
Road accidents frequently occur due to delayed human reaction during sudden braking or unpredictable speed variations of the vehicle ahead. Human drivers react after the event, while a predictive system can respond earlier and more safely.
The challenge is to design a system that can:
Predict future vehicle motion
Maintain a safe following distance
React smoothly to sudden traffic changes
Operate within real‑time computational constraints
We implement a Model Predictive Control based Adaptive Cruise Control framework that runs in a fixed real‑time loop (10–100 ms). The controller predicts future system states over a short horizon and optimizes acceleration commands while respecting safety and physical constraints.
The project is designed as a reproducible and extensible open‑source framework, allowing developers and researchers to experiment with different control strategies.
Two‑vehicle longitudinal simulation
Target Vehicle and Controlled Vehicle modeling
Safe distance maintenance
Anticipatory braking behavior
Real‑time execution (~50 Hz)
Constraint‑aware optimization using MPC
Fully open‑source implementation
Technology Stack
Python 3
NumPy & SciPy
CVXPY with OSQP solver
Matplotlib for visualization
GitHub for collaboration and version control
The project is under active development for FOSS Hack 2026.
Core simulation and controller components are currently being implemented, with real‑time validation and benchmarking planned in subsequent phases.