This repository employs neural reachability to reason about the safety of an autonomous vehicle with an MPC controller. The vehicle aims to undertake five different maneuvers driven by the MPC controller while neural network reachability checks for intersections with obstacles to ensure safety. To see neural reachability employed as an online monitoring system in a simplex architecture, see the repository here.
Neural-Reachability is a framework for neural network-based reachability analysis. We train deep neural networks to learn the reachable sets of dynamical systems. Formally, we say that given a system, a set of initial conditions, a disturbance set, and a bounded time interval of interest, neural reachability estimates the reachable sets of the system through deep neural networks. In this repository, we deploy neural reachability for online monitoring of a control system. In particular, it acts as a decision module for a vehicle completing a set of maneuvers. If a vehicle's control action is deemed unsafe (predicted reachable sets intersect with obstacles), the vehicle is brought to a halt.
- Driving in a straight lane close to a curb.
- Taking a left turn.
- Taking a right turn.
- Making a U-turn.
- Changing lanes due to a roadblock.
We checked this repository with the following operating systems:
- Ubuntu 20.04
- Mac Big Sur Version 11.4
- Windows 10
Clone the repository and install the required dependencies:
git clone https://github.com/Abdu-Hekal/Neural-Reachability.git
cd mpc-reachability
pip install -r requirements.txt
From the terminal, run:
python mpc.py <MANEUVER_NUMBER>
to visualise MPC with Reachability for a specified benchmark from 1 to 5.
python mpc.py 2
runs MPC with reachability for the second Maneuver: Taking a left turn
This work on Neural reachability has been published at the 2022 IEEE 25th International Conference on Intelligent Transportation (ITSC), available here.
If you cite this work, please cite
Bogomolov, S., Hekal, A., Hoxha, B. and Yamaguchi, T., 2022, October. Runtime Assurance for Autonomous Driving with Neural Reachability. In 2022 IEEE 25th International Conference on Intelligent Transportation Systems (ITSC) (pp. 2634-2641). IEEE.
Bibtex:
@inproceedings{bogomolov2022runtime,
title={Runtime Assurance for Autonomous Driving with Neural Reachability},
author={Bogomolov, Sergiy and Hekal, Abdelrahman and Hoxha, Bardh and Yamaguchi, Tomoya},
booktitle={2022 IEEE 25th International Conference on Intelligent Transportation Systems (ITSC)},
pages={2634--2641},
year={2022},
organization={IEEE}
}
When installing requirements which installs pycddlib
, a common issue arises when the installation process fails to locate the gmp.h
header file. This file is essential as it contains declarations necessary for using the GNU Multiple Precision Arithmetic Library (GMP).
To resolve this issue, you can set environment variables that point the compiler (clang
or gcc
) to the directory where gmp.h
is located. Here's how you can do it:
-
Check GMP Installation: First, ensure that GMP is installed on your system. You can install it using package managers like Homebrew on macOS or
apt
on Ubuntu/Debian:On macOS:
brew install gmp
On Ubuntu/Debian:
sudo apt-get update sudo apt-get install -y libgmp-dev
-
Set Environment Variables: Once GMP is installed, export the paths to the GMP header files (gmp.h) and libraries (libgmp.a or libgmp.so). This tells the compiler where to find these files during the build process:
On macOS:
export C_INCLUDE_PATH=$(brew --prefix gmp)/include export LIBRARY_PATH=$(brew --prefix gmp)/lib
On Ubuntu/Debian:
export C_INCLUDE_PATH=/usr/include/ export LIBRARY_PATH=/usr/lib/
-
Reinstall pycddlib: After setting the environment variables, attempt to install pycddlib again using pip:
pip install pycddlib