Skip to main content

Quickly generate prototype test scenarios for automated driving

Project description

simple-scenario

Quickly generate prototype test scenarios for automated driving.

Notice

[!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

Install

pip install simple-scenario

Use

simple-scenario offers a rich python API and a basic CLI for test scenario generation.

Python API

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).

:bulb: 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.

CLI

The CLI supports generating a set of

  • an OpenSCENARIO (.xosc),
  • an OpenDRIVE (.xodr),
  • and a Lanelet2 (.osm) file

for a given simple-scenario config file (.json) through the following command

simple-scenario create demo/cutout_example.json

Extras

commonroad-extra

:warning: 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.

lxd-extra

pip install simple-scenario[lxd]

Enables reading leveLXData datasets through lxd-io.

:warning: Currently only the highD dataset is supported

Please conduct the tutorials/C_01_lxd_extra.ipynb for more details.

Dev

To develop simple-scenario, you must first clone the repository.

$ git clone git@gitlab.ika.rwth-aachen.de:fb-fi/scenarios/simple-scenario.git
$ cd simple-scenario

It is recommended to use uv for package management. If you do not want to use uv, please consult the Without uv section.

With uv

Install requirements with

$ uv sync

To run a script, use

$ uv run /path/to/script.py

or directly use the python interpreter from the .venv folder in e.g. VSCode.

To run the tests, install the dev requirements with

$ uv sync --dev

and run the tests

$ uv run pytest

To run the notebooks in the tutorials/ folder in VSCode, select the .venv's as the kernel (see here for more info).

Without uv

Install the project editable

$ python -m pip install -e .

To run the tests, first install pytest

$ python -m pip install pytest

and run

$ pytest

Acknowledgements

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_scenario-0.10.1.tar.gz (49.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_scenario-0.10.1-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file simple_scenario-0.10.1.tar.gz.

File metadata

  • Download URL: simple_scenario-0.10.1.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for simple_scenario-0.10.1.tar.gz
Algorithm Hash digest
SHA256 28295e20266279ba7093db39a705f8a40d6774b327ad64ad05d1b40e070501b9
MD5 16a0bf16e01d317dea23d4ccab7c6fc0
BLAKE2b-256 22d89dd98dce7cb04224d16744847ac9dcfab0989c1a4a4125b6d450b2d026c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_scenario-0.10.1.tar.gz:

Publisher: release.yml on ika-rwth-aachen/simple-scenario

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simple_scenario-0.10.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_scenario-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7dea78b4ab4cf77f26ac0df9a10f5cd1d5fb5a0fd7d43055d6877d6a8b718fd0
MD5 dea22d0fe6792e9167f85a09de6e2927
BLAKE2b-256 30b69bab44055885ca88509d028d7d2d9088286470dd3a5e2d89fb32e343f617

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_scenario-0.10.1-py3-none-any.whl:

Publisher: release.yml on ika-rwth-aachen/simple-scenario

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page