Skip to content

ika-rwth-aachen/simple-simulation

Repository files navigation

simple-simulation

Execute simulation runs defined by simple-scenario to efficiently develop scenario-based testing methods (e.g., selecting test scenarios or testing prototype automated driving systems).

Examples

💡 To recreate these videos use: examples/generate_simulation_run_videos.py.

Free driving test scenario

examples/example_scenario0.json

Test scenario:

Simulation run:

Result: is_goal_reached

Deceleration test scenario

examples/example_scenario1.json

Test scenario:

Simulation run:

Result: is_standstill

Cut-in test scenario

examples/example_scenario2.json

Test scenario:

Simulation run:

Result: is_collision

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: [email protected]

Install

To use or develop simple-simulation, you must first clone the repository.

$ git clone [email protected]:fb-fi/simulation/simple-simulation/simple-simulation.git
$ cd simple-simulation

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

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

Use

💡 You should first complete the Installation.

Run some simulations

  1. Open the file test/test_challenger_a.py and run it by clicking on the run arrow in the top right corner.

  2. There should be some videos in the folder test/test_results/challenger_a/.

You can watch them directly in VSCode.

Dev

The simple_simulation module consists of the following submodules:

  • simulation_manager/: Main module handling all other modules to run the main simulation loop.
  • pilots/: Pilots for the simulation actors. A pilot takes high-level decisions for lateral and longitudinal control for exactly one simulation actor based on the current situation in the simulation. Each pilot must be a subclass of Pilot in pilots/pilot.py. The logic contained in highway_pilot.py is roughly based on that of the l3pilot-aeb-adf.
  • simulation_core/: The lightweight simulation core using CommonRoad vehicle models.

Acknowledgements

This package is developed as part of the Hi-Drive project.

The research leading to these results has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 101006664. The sole responsibility of this publication lies with the authors. The authors would like to thank all partners within the Hi-Drive project (hi-drive.eu) for their cooperation and valuable contribution.

About

Execute simulation runs defined by simple-scenario to develop scenario-based testing methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages