CommonRoad Reach: A Toolbox for Computing Reachable Sets of Automated Vehicles
Project description
CommonRoad-Reach: A Toolbox for Reachability Analysis of Automated Vehicles
Reachability analysis has gained increasing popularity in motion planning and safeguarding of automated vehicles (AVs). While existing tools for reachability analysis mainly focus on general-purpose algorithms for formal verification of dynamical systems, a toolbox tailored to AV-specific applications is not yet available. The CommonRoad-Reach toolbox
- integrates different methods for computing reachable sets using polytopic set propagation and graph-based propagation;
- provides Python and C++ implementations of the algorithms, thus offering convenient prototyping and real-time computation for the users; and
- extracts driving corridors which can be used as planning constraints for motion planners.
System Requirements
The software is written in Python 3.7 and C++17, and was tested on Ubuntu 18.04. It should be compatible with later versions. For building the code, the following minimum versions are required:
- GCC and G++: version 9 or above
- CMake: version 3.15 or above.
- Pip: version 21.3 or above
We further recommend using Anaconda to manage your virtual python environment.
Installation options
We provide two installation options for CommonRoad-Reach: Installation as a Python package or building from source.
-
Python Package: Install the python package via
pip
in your Conda environment:$ pip install commonroad-reach
-
Build from source: To build the project from source and install it in your Conda environment, please refer to the descriptions below. You may need GCC-10 to build successfully.
Building from Source
Third Party Dependencies
The following third-party dependencies of the C++ code are only required for building the project from source!
Essential dependencies:
- CommonRoad Drivability Checker (version >= 2023.1)
- Boost.Geometry
- OpenMP
- yaml-cpp
- pybind11
Optional dependencies (testing and documentation):
The additional Python dependencies are listed in requirements.txt
.
Building the Code
-
Install Python dependencies:
$ pip install -r requirements.txt
-
Install CommonRoad Drivability Checker. Please refer to its documentation for installation.
-
Install yaml-cpp and Doctest:
$ sudo apt update $ sudo apt install libyaml-cpp-dev $ sudo apt install doctest-dev
-
Install/upgrade OpenMP:
$ sudo apt-get install libomp-dev $ sudo apt upgrade libomp-dev
-
Build the package and install it to your conda environment via pip command:
$ CRDC_DIR="/path/to/commonroad-drivability-checker/" pip install -v .
This will build the python binding (pycrreach) required for collision checks and other C++-boosted computations.
Note:
- Replace
"/path/to/commonroad-drivability-checker/"
with the path to the Drivability Checker folder on your machine. - The
-v
flag (verbose) prints information about the build progress
Optional:
- To add unit tests, set variable
ADD_TESTS=ON
before thepip
command. - To build the code in Debug mode, set
debug=1
in the setup configuration file (setup.cfg
).
Getting Started
Run the exemplary scripts to compute reachable sets and extract driving corridors.
-
To compute reachable sets, run
compute_reachable_set.py
. -
To extract driving corridors, run
extract_driving_corridors.py
.
The outputs will be stored in the ./output/
folder. Default and scenario-specific configurations are stored in the ./configurations/
folder.
Documentation
The documentation of our toolbox is available on our website: https://cps.pages.gitlab.lrz.de/commonroad-reachable-set/.
In order to generate the documentation via Sphinx locally, run the following commands in the root directory:
$ pip install -r ./docs/requirements_doc.txt
$ cd docs/Sphinx
$ make html
The documentation can then be launched by browsing ./docs/Sphinx/build/html/index.html/
.
Citation
If you use our toolbox for your research, please cite our paper:
@InProceedings{iraniliu2022commonroad,
title = {{CommonRoad-Reach}: {A} toolbox for reachability analysis of automated vehicles},
author = {Irani Liu, Edmond and W\"ursching, Gerald and Klischat, Moritz and Althoff, Matthias},
booktitle = {Proc. of the IEEE Int. Conf. Intell. Transp. Syst.},
pages = {2313--2320},
year = {2022},
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for commonroad_reach-2023.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3966da5aac6647c62c2ae01ebf2354164d5f7a78c28aa8b861d11d4648c7b1fc |
|
MD5 | 69191e3e1dcd8a9aa0328f7ac600b8ec |
|
BLAKE2b-256 | 1474fa1a0584fb1fbff937da8a177682c9728bef7578d3fc9eeb7a3c50db7656 |
Hashes for commonroad_reach-2023.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef89180978158b84cc3d9299f832b5225b9547672668d43f34d4536193854255 |
|
MD5 | 1eba95d5dcdfb4479da0d0cc6b09349a |
|
BLAKE2b-256 | 6d0b8c5d007d1f15f16b606d1e64ee8591dbc10365c56646a5f534618e4259d5 |
Hashes for commonroad_reach-2023.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 948cabe89b5d5a1a54b663f8486c10641439cf51434e33bc9933efebaadecef3 |
|
MD5 | 10314765d50050e2f9f3a07796217c52 |
|
BLAKE2b-256 | 419aac777c591ee6d6a079b4bf62eb3b2e723874b215ce359419743a3353c959 |
Hashes for commonroad_reach-2023.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1065226b673e9f8c70313350436d9868a28b24afe3e0706da04cb36defc0414 |
|
MD5 | 41eebb901d311177a3290bb4d7938196 |
|
BLAKE2b-256 | 5cdef611d30e5012b94a706786075f0cbf7a7342a7a6149ad07879f0aa091d2d |