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:

Required Python dependencies are listed in requirement.txt.

Building the Code

We strongly recommend using Anaconda to manage Python virtual environments.

  1. Install Python dependencies:

    $ pip install -r requirements.txt
    
  2. Check the following minimum required versions and update them if necessary:

    • GCC and G++: version 9.0 or above

    • CMake: version 3.15 or above

  3. Install CommonRoad Drivability Checker. Please refer to its documentation for installation.

  4. Install yaml-cpp and Doctest:

    $ sudo apt update
    $ sudo apt install libyaml-cpp-dev
    $ sudo apt install doctest-dev
    
  5. Install/upgrade OpenMP:

    $ sudo apt-get install libomp-dev
    $ sudo apt upgrade libomp-dev
    
  6. 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 -v flag prints verbose information about the build progress.

Optional:

  • To add unit tests, set variable ADD_TESTS=ON before the pip command.

  • To build the code in Debug mode, set debug=1 in 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/.