CommonRoad-RL

This project contains a software package to solve motion planning problems on CommonRoad using reinforcement learning methods, currently based on OpenAI Stable Baselines.

The software is written in Python 3.7 and tested on Linux 18.04. The usage of the Anaconda Python distribution is strongly recommended.

Prerequisits

This project should be run with conda. Make sure it is installed before proceeding with the installation. Initialize conda:

/path/to/conda/bin/conda init

Install build packages:

sudo apt-get update
sudo apt-get install build-essential make cmake

Installation

Currently, the package can only be installed from the repository. First, clone it:

git clone https://gitlab.lrz.de/tum-cps/commonroad-rl.git

Setup a new conda env (or install packages to an existing conda env e.g. myenv conda env update –name myenv –file environment.yml)

conda env create -n cr37 -f environment.yml git submodule init git submodule update –recursive || exit_with_error “Update submodules failed”

Note that commonroad-interactive-scenarios is only needed if you want to evaluate a trained model on SUMO interactive scenarios. To exclude this module, run git -c submodule.”external/commonroad-interactive-scenarios”.update=none submodule update –init –recursive instead.

Optional: Install pip packages for the docs. If you want to use the jupyter notebook, also install jupyter.

source activate cr37 pip install -r commonroad_rl/doc/requirements_doc.txt conda install jupyter

After the repository is cloned, CommonRoad-RL can be installed without sudo rights with:

bash scripts/install.sh -e cr37 --no-root

and with sudo rights:

bash scripts/install.sh -e cr37

cr37 to be replaced by the name of your conda environment if needed.

This will build all softwares in your home folder. You can press ctrl + c to skip when asked for sudo password. Note that all necessary libraries need to be installed with sudo rights beforehands. Please ask your admin to install them for you if they are missing.

Test if installation was successful

Further details of our test system refer to ./commonroad_rl/tests. Run tests:

source activate cr37
pytest commonroad_rl/tests --scope unit module -m "not slow"

Changelog

Getting Started

A tutorial on the main functionalities can be found in the form of jupyter notebooks in the tutorials folder.

..Indices and tables

Contact information

Website:

http://commonroad.in.tum.de

Email:

commonroad@lists.lrz.de