Quickly generate prototype test scenarios for automated driving.
Generate all kinds of highway test scenarios from simple config files (see .json files in demo/examples/).
💡 To recreate these gifs use: demo/examples/generate_gifs.py.
Deceleration test scenario (example_scenario1.json):
Cut-in test scenario (example_scenario2.json):
Deceleration test scenario with surrounding traffic (example_scenario3.json):
Cut-in test scenario with surrounding traffic (example_scenario4.json):
💡 For more examples, see tutorials/.
Important
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University. We cover a wide variety of research topics within our Vehicle Intelligence & Automated Driving domain. If you would like to learn more about how we can support your automated driving or robotics efforts, feel free to reach out to us! :email: opensource@ika.rwth-aachen.de
pip install simple-scenariosimple-scenario offers a rich python API and a basic CLI for test scenario generation.
The python API supports various ways of generating and interacting with test scenarios.
Please conduct the tutorials/A_01_getting_started.ipynb to learn about the basic usage of simple-scenario.
Please find more in-depth examples in the test/ folder (E.g., test/test_scenario.py shows which input formats can be used).
💡 Have a look at the Dev section of this readme to find out how to setup the project and run the tutorial notebooks and tests.
The CLI supports generating a set of
- an OpenSCENARIO (
.xosc) - and an OpenDRIVE (
.xodr) file
for a given simple-scenario config file (.json) through the following command
simple-scenario create demo/cutout_example.json
⚠️ Needs python version 3.8
pip install simple-scenario[commonroad]Enables advanced features like feasibility checking of the scenario (powered by the CommonRoad Drivability Checker) and exporting the scenario to the CommonRoad (CR) format.
Please conduct the tutorials/B_01_commonroad_extra.ipynb for more details.
pip install simple-scenario[lxd]Enables reading leveLXData datasets through lxd-io.
⚠️ Currently only the highD dataset is supported
Please conduct the tutorials/C_01_lxd_extra.ipynb for more details.
To develop simple-scenario, you must first clone the repository.
$ git clone git@github.com:ika-rwth-aachen/simple-scenario.git
$ cd simple-scenarioIt is recommended to use uv for package management. If you do not want to use uv, please consult the Without uv section.
Install requirements with
$ uv syncTo run a script, use
$ uv run /path/to/script.pyor directly use the python interpreter from the .venv folder in e.g. VSCode.
To run the tests, install the dev requirements with
$ uv sync --devand run the tests
$ uv run pytestTo run the notebooks in the tutorials/ folder in VSCode, select the .venv's as the kernel (see here for more info).
Install the project editable
$ python -m pip install -e .To run the tests, first install pytest
$ python -m pip install pytestand run
$ pytestThis package is developed as part of the SYNERGIES project.
Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or European Climate, Infrastructure and Environment Executive Agency (CINEA). Neither the European Union nor the granting authority can be held responsible for them.



