Recreate test scenarios from UN/ECE R.157 E/ECE/TRANS/505/Rev.3/Add.156/Amend.4 Annex 3 pp. 45-56 using simple-scenario.
💡 To recreate these gifs use: examples/generate_gifs.py.
Cut-in test scenario:
Cut-out test scenario:
Deceleration test scenario:
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
To generate alks-scenarios, you must first clone the repository.
$ git clone git@github.com:ika-rwth-aachen/alks-scenarios.git
$ cd alks-scenariosIt 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 pytestInstall the project editable
$ python -m pip install -e .To run the tests, first install pytest
$ python -m pip install pytestand run
$ pytestUse the following commands to generate test scenarios of different logical scenarios:
alks_scenarios/cutin_scenario_generator.py: Generate Cut-in test scenarios from UNECE R157 E/ECE/TRANS/505/Rev.3/Add.156/Amend.4, Annex 3, pp. 45-52alks_scenarios/cutout_scenario_generator.py: Generate Cut-out test scenarios from UNECE R157 E/ECE/TRANS/505/Rev.3/Add.156/Amend.4, Annex 3, pp. 53-55alks_scenarios/deceleration_scenario_generator.py: Generate Deceleration test scenarios from UNECE R157 E/ECE/TRANS/505/Rev.3/Add.156/Amend.4, Annex 3, p. 56
Per default, test scenarios are generated in results/annex3.
Per test scenario, the following files are generated:
- Descriptive top view image for visualization purposes (e.g.,
cutin_plot_01_ve0_60_dv0_0_dx0_0.0_vy_0.1.png) - A simple-scenario config for loading the scenario into a simple-scenario
Scenarioobject (e.g.,cutin_plot_01_ve0_60_dv0_0_dx0_0.0_vy_0.1.json) - A set of OpenSCENARIO and OpenDRIVE file for a simulation tool like esmini (e.g.,
cutin_plot_01_ve0_60_dv0_0_dx0_0.0_vy_0.1.xosc,cutin_plot_01_ve0_60_dv0_0_dx0_0.0_vy_0.1.xodr)
This 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.


