CommonRoad - SUMO Interface
Interface between CommonRoad and the traffic simulator SUMO.
It allows you to run non-interactive simulations to generate traffic on lanelet networks to create new CommonRoad scenarios. Additionally, you can run interactive simulations where a motion planner is executed in tandem with SUMO. The ego vehicle is controlled by the motion planner, while the behavior of the other vehicles is simulated by SUMO.
More about the interface can be found in the original paper:
Moritz Klischat, Octav Dragoi, Mostafa Eissa, and Matthias Althoff, Coupling SUMO with a Motion Planning Framework for Automated Vehicles, SUMO 2019: Simulating Connected Urban Mobility
Quick Start
Installation
The interface is available on PyPI and can be easily installed:
$ pip install commonroad-sumo
SUMO itself is already included as a dependency, therefore no further steps are required to use the interface.
Example Usage
The following snippet will simulate random traffic on the lanelet network of a given CommonRoad scenario for 100 time steps and write the resulting CommonRoad scenario to /tmp/simulated_scenario.xml:
from commonroad.common.file_reader import CommonRoadFileReader
from commonroad_sumo import NonInteractiveSumoSimulation
scenario, _ = CommonRoadFileReader("<path to CommonRoad scenario>").open()
simulation_result = NonInteractiveSumoSimulation.from_scenario(scenario).run(simulation_steps=100)
simulation_result.write_to_file("/tmp/simulated_scenario.xml")
Documentation
The full documentation can be found at cps.pages.gitlab.lrz.de/commonroad/sumo-interface.
Metadata
Release files for commonroad-sumo 2025.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| commonroad_sumo-2025.1.4.tar.gz | 110.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commonroad_sumo-2025.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 247.3 kB
Release files / commonroad_sumo-2025.1.4.tar.gz
| Download URL | commonroad_sumo-2025.1.4.tar.gz |
|---|---|
| Size | 110.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4887fb89999e6815b3985b35734a8289165df812dbf52076c9d6548fc4fd4626
|
|
BLAKE2b-256 checksum How to use checksums |
328ef79d6d0d2968825c226ae62260b4d40d37fb4f3a8a3056d04aaf8009e5d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.19 Linux/5.15.0-87-generic
|
Release files / commonroad_sumo-2025.1.4-py3-none-any.whl
| Download URL | commonroad_sumo-2025.1.4-py3-none-any.whl |
|---|---|
| Size | 136.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f749209677cdbbf0167bf89562c1c506af8b861956d3a6daab9b7615c43f871
|
|
BLAKE2b-256 checksum How to use checksums |
fb1fbb72411cce7f3709d06b8d4faba610b956632714127ff921c0cae62dbd81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.10.19 Linux/5.15.0-87-generic
|