Getting Started
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 linux distributions.
Third Party Libraries and Packages
The C++ code depends on the following third party libraries:
CommonRoad Drivability Checker (version >= 2022.1)
Doctest (optional: for building unit tests)
Doxygen (optional: for documentation)
Required Python dependencies are listed in requirement.txt.
Building the Code
We strongly recommend using Anaconda to manage Python virtual environments.
Install Python dependencies:
$ pip install -r requirements.txtCheck the following minimum required versions and update them if necessary:
GCC and G++: version 9.0 or aboveCMake: version 3.15 or above
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 your local path to the Drivability Checker directory.The
-vflag prints verbose information about the build progress.
Optional:
To add unit tests, set variable
ADD_TESTS=ONbefore the pip command.To build the code in Debug mode, set
debug=1in the setup configuration file (setup.cfg).
Running the Code
Tutorial Jupyter notebooks are available at ./tutorials/. Exemplary scripts for computing reacahble sets and extracint driving corridors are also provided:
To compute reachable sets, run
commonroad_reachset/compute_reachable_set.py.To extract driving corridors, run
commonroad_reachset/extract_driving_corridors.py.
The outputs will be stored in the ./output/ folder. Default and scenario-specific configurations are stored in the ./configurations/ folder.
Doxygen Documentation
Run the following command in the root directory to generate C++ documentation.
$ doxygen ./docs/Doxyfile
Doxygen documentation can be launched by browsing ./docs/Doxygen/html/index.html/.