CommonRoad-io

The commonroad-io package provides methods to read, write, and visualize CommonRoad scenarios and planning problems. Furthermore, it can be used as a framework for implementing motion planning algorithms to solve CommonRoad Benchmarks and is the basis for other tools of the CommonRoad Framework. With commonroad-io, those solutions can be written to xml-files for uploading them on commonroad.in.tum.de.

commonroad-io 2024.1 is compatible with CommonRoad scenarios of version 2020a and supports reading 2018b scenarios.

The software is written in Python and tested on Linux for the Python 3.8, 3.9, 3.10, 3.11, and 3.12.

Documentation

The full documentation of the API and introducing examples can be found under https://cps.pages.gitlab.lrz.de/commonroad/commonroad-io/.

For getting started, we recommend our tutorials.

Additional Tools

Based on commonroad-io, we have developed a list of tools for implementing motion-planning algorithms:

Requirements

The required dependencies for running commonroad-io are:

  • numpy>=1.13

  • scipy>=1.5.2

  • shapely>=1.6.4

  • matplotlib>=2.2.2

  • lxml>=4.2.2

  • networkx>=2.2

  • Pillow>=7.0.0

  • iso3166>=1.0.1

  • rtree>=0.8.3

  • protobuf==3.20.1

Installation

commonroad-io can be installed with:

pip install commonroad-io

Alternatively, clone from our gitlab repository:

git clone https://gitlab.lrz.de/tum-cps/commonroad_io.git

and add the folder commonroad-io to your Python environment.

Changelog

Compared to version 2024.1, the following features have been added or changed:

Added

  • Country-independent traffic sign enum

  • Missing country-specific max speed sign IDs

  • Automatically generated TrafficSignIDCountries enum for importing in other scripts

  • GroundTruthPredictor class to use stored trajectories as prediction

  • Function to append a state to a trajectory

Fixed

  • Typo: TrafficSigInterpreterTrafficSignInterpreter

  • Typo EMERGENCY_STOP traffic sign enum name

  • Activation condition for drawing occupancies

  • Traffic sign with first occurrence set to None can be hashed

  • Traffic light can be plotted without a TrafficLightCycle

Changed

  • Optimization-based planner tutorial now uses planner and predictor interfaces

  • Simplified traffic sign matching in FileReader

  • The occupancy set, initial time step, and final time step are now computed properties of TrajectoryPrediction

  • Trajectory now allows direct access to the state list

  • Drawing occupancies by default false

  • Improved visual appearance of notebooks

Removed

  • Setters for initial and final time step in predictions

  • Setter for occupancy_set in TrajectoryPrediction

A detailed overview about the changes in each version is provided in the Changelog.

Getting Started

A tutorial on the main functionalities of the project is available here.

Indices and tables

Contact information

Website:

http://commonroad.in.tum.de

Email:

commonroad@lists.lrz.de