logologo
Sign In

CommonRoad-OpenSCENARIO-Converter

We substantially extend the conversion from OpenDRIVE to CommonRoad by encoding the dynamic elements of a scenario specified by OpenSCENARIO. Our converter is expected to be valuable to academic groups and industry professionals alike, given the vast number of openly accessible scenarios available in the CommonRoad and OpenSCENARIO formats.

general_picture
Installation:
pip install commonroad-openscenario-converter

A minimal example of using the converter:

from osc_cr_converter.converter.osc2cr import Osc2CrConverter
from osc_cr_converter.utility.configuration import ConverterParams
from osc_cr_converter.utility.visualization import visualize_scenario

# scenario path and name
openscenario = 'Path_to_Your_OpenSCENARIO.xosc'

# build configuration
config = ConverterParams()

# convert OpenSCENARIO to CommonRoad
converter = Osc2CrConverter(config)
scenario = converter.run_conversion(openscenario)

# visualize the converted CommonRoad scenario
visualize_scenario(scenario, config)

Publications

Automatic Traffic Scenario Conversion from OpenSCENARIO to CommonRoad

Authors:
Yuanfei Lin, Michael Ratzel, and Matthias Althoff