Interface between CommonRoad and the SUMO traffic simulator
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file commonroad_sumo-2025.1.3.tar.gz.
File metadata
- Download URL: commonroad_sumo-2025.1.3.tar.gz
- Upload date:
- Size: 110.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.18 Linux/5.15.0-87-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a00af4e7b264e7e79fdc26a38eeeeae4bd05a5fc5d30525a028306e58f7e3e41
|
|
| MD5 |
f5fe2055db6800d5e2d1706b9c6464a9
|
|
| BLAKE2b-256 |
fa7c5ca7239dd8cec0459c5e00d3be588cf227b09c33737491170ca2e15eb7c1
|
File details
Details for the file commonroad_sumo-2025.1.3-py3-none-any.whl.
File metadata
- Download URL: commonroad_sumo-2025.1.3-py3-none-any.whl
- Upload date:
- Size: 136.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.18 Linux/5.15.0-87-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b17191195ea8e4ee5dbf6703070017803b2f0216ad326cf1cb54e307e42b9fc5
|
|
| MD5 |
da65ad111e000d72d2daeef023e78330
|
|
| BLAKE2b-256 |
1a5ac6c27ae4f98aad291075f5214a2c59815a16ce40e995a629098d61c32b70
|