Dataset Converters
This repository contains converters from different datasets to CommonRoad scenarios using a common commandline interface. Currently, we support:
Install
TODO git submodule
pip install commonroad-dataset-converter
Install with support for nuplan dataset
pip install commonroad-dataset-converter[nuplan]
Development setup
This project uses poetry. Please follow the instructions to create the virtual development environment.
Usage
Type following command for help
$ crconvert --help
Usage: crconvert [OPTIONS] INPUT_DIR OUTPUT_DIR COMMAND [ARGS]...
Generates CommonRoad scenarios from different datasets
Arguments:
INPUT_DIR Path to the data folder [required]
OUTPUT_DIR Directory to store generated CommonRoad files [required]
Options:
--num-time-steps INTEGER Maximum number of time steps in the
CommonRoad scenario [default: 150]
--num-planning-problems INTEGER
Number of planning problems per CommonRoad
scenario. More than one creates a
cooperative scenario. [default: 1]
--keep-ego / --no-keep-ego Vehicles used for planning problem should be
kept in the scenario. [default: no-keep-
ego]
--obstacles-start-at-zero / --no-obstacles-start-at-zero
The lowest time step in the scenario is set
to zero. [default: no-obstacles-start-at-
zero]
--downsample INTEGER Decrease dt by n*dt [default: 1]
--num-processes INTEGER Number of processes to convert dataset.
[default: 1]
--all-vehicles / --no-all-vehicles
Create one planning problem/scenario for
each valid vehicle. Invalidates num-time-
steps. [default: no-all-vehicles]
--routability-check [nocheck|strict]
Check routability of planning_problem
[default: RoutabilityCheck.Strict]
--output-type [xml|pb] File type of CommonRoad scenarios [default:
xml]
--max-scenarios INTEGER Only create up to n scenarios.
--samples-per-recording INTEGER
Randomly sample n scenarios from each
recording.
--help Show this message and exit.
Commands:
exid Convert the exiD dataset into CommonRoad scenario(s).
highd Convert the highD dataset into CommonRoad scenario(s).
ind Convert the inD dataset into CommonRoad scenario(s).
interaction Convert the INTERACTION dataset into CommonRoad scenario(s).
mona Convert the MONA dataset into CommonRoad scenario(s).
round Convert the rounD dataset into CommonRoad scenario(s).
sind Convert the SIND into CommonRoad scenario(s).
Docker
The dataset converter can also be used within a docker container. We provide a Dockerfile to build the image.
docker build -t commonroad-dataset-converter .
The image's entrypoint calls crconvert. Any arguments passed to docker run are passed to the executable. To access the original dataset and converted scenarios, provide it as a volume mount -v PATH_TO_DATASET:/data:ro and -v PATH_TO_OUTPUT_DIRECTORY:/output
Example: Convert the highD dataset
docker run -v `pwd`/highd_dataset:/data:ro -v `pwd`/highd_scenarios:/output commonroad-dataset-converter \
--max-scenarios 20 --samples-per-recording 20 /data /output highd
Metadata
Release files for commonroad-dataset-converter 2025.1.0
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_dataset_converter-2025.1.0.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commonroad_dataset_converter-2025.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / commonroad_dataset_converter-2025.1.0.tar.gz
| Download URL | commonroad_dataset_converter-2025.1.0.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
255310c5ad80e254218044b559e8cf734b8257ad9bba334c1eda100d63fc2ddd
|
|
BLAKE2b-256 checksum How to use checksums |
6bc57f082b42e38b2f207de536e8aa823cbd2123d567c5ed9b702977cc3f765c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.10.18 Linux/5.15.0-87-generic
|
Release files / commonroad_dataset_converter-2025.1.0-py3-none-any.whl
| Download URL | commonroad_dataset_converter-2025.1.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
818cdb63afe4aa0eee7321f7b30e8da27e511b7a3e3af1dce87f7d4e725a2595
|
|
BLAKE2b-256 checksum How to use checksums |
9a02da613087f2c2b080f88896fdef5a37f54c4bb7ba659ebcc2c786898288e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.4 CPython/3.10.18 Linux/5.15.0-87-generic
|