Skip to main content

Python tool to read, write, and visualize CommonRoad scenarios and solutions for automated vehicles.

Project description


Numerical experiments for motion planning of road vehicles require numerous ingredients: vehicle dynamics, a road network, static obstacles, dynamic obstacles and their movement over time, goal regions, a cost function, etc. Providing a description of the numerical experiment precise enough to reproduce it might require several pages of information. Thus, only key aspects are typically described in scientific publications, making it impossible to reproduce results - yet, reproducibility is an important asset of good science.

Composable benchmarks for motion planning on roads (CommonRoad) are proposed so that numerical experiments are fully defined by a unique ID; all required information to reconstruct the experiment can be found on . Each benchmark is composed of a vehicle model, a cost function, and a scenario (including goals and constraints). The scenarios are partly recorded from real traffic and partly hand-crafted to create dangerous situations. Solutions to the benchmarks can be uploaded and ranked on the CommonRoad Website. Learn more about the scenario specification here.


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_io 2021.2 is compatible with CommonRoad scenario in version 2020a and supports reading 2018b scenarios.

The software is written in Python 3.6 and tested on MacOs and Linux. The usage of the Anaconda Python distribution is strongly recommended.


The full documentation of the API and introducing examples can be found under

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:


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
  • commonroad-vehicle-models>=2.0.0
  • rtree>=0.8.3


CommonRoad_io can be installed with:

pip install commonroad-io

Alternatively, clone from our gitlab repository:

git clone

and add the folder commonroad_io to your Python environment.


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

  • Spatial indexing via STRTree in LaneletNetwork for faster computation of lanelet queries via positions or shapes
  • The function LaneletNetwork.create_from_lanelet_network accepts now a shape and set of lanelet types which should be excluded
  • Shapely polygon for lanelets is created by default
  • Function convert_to_polygon() within Lanelet class is deprecated and will be removed in the next release

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

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for commonroad-io, version 2021.3
Filename, size File type Python version Upload date Hashes
Filename, size commonroad_io-2021.3-py3-none-any.whl (2.8 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size commonroad-io-2021.3.tar.gz (2.5 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page