Main Content

Export Driving Scenario to RoadRunner Scenario Simulation

RoadRunner Scenario is an interactive editor that lets you design scenarios for simulating and testing automated driving systems. Using the Driving Scenario Designer app, you can now:

  • Launch the RoadRunner application with automatic import of current driving scenario elements to a RoadRunner scenario.

  • Export the road network and static actors in the driving scenario to RoadRunner HD Map file format.

When exporting a driving scenario to RoadRunner scenario, the Driving Scenario Designer app generates these files:

  • A RoadRunner HD Map road data model representing the road network and static actors in the underlying RoadRunner scene.

  • A CSV file with trajectory data for each dynamic actor in the RoadRunner scenario.

Prerequisites

Exporting a driving scenario to RoadRunner scenario requires a RoadRunner installation with these products:

  • RoadRunner Scenario — To import trajectories of dynamic actors in the driving scenario

  • RoadRunner Scene Builder — To build a 3-D scene of the road network and actors in the driving scenario

  • RoadRunner

    Asset Library Add-On — To map the driving scenario actors to their corresponding RoadRunner assets

Load a Scenario in Driving Scenario Designer App

Open the Driving Scenario Designer app.

drivingScenarioDesigner

Load a prebuilt EURO NCAP driving scenario. On the app toolstrip, select Open > Prebuilt Scenario. The PrebuiltScenarios folder opens, which includes subfolders for all prebuilt scenarios available in the app. Double click EuroNCAP folder, and then navigate to the Autonomous Emergency Braking subfolder.

Select AEB_PedestrianTurning_Farside_50width_15kmh scenario and open it. Alternatively, you can create your own custom scenario using the Driving Scenario Designer app or import a programmatically created driving scenario into the app.

The AEB_PedestrianTurning_Farside_50width_15kmh scenario consists of a vehicle under test turning left at an intersection where a pedestrian is walking across the same road.

AEB_PedestrianTurning_Farside_50width_15kmh scenario open in Driving Scenario Designer app canvas.

Launch RoadRunner Scenario from Driving Scenario Designer App

On the app toolstrip, select Export > RoadRunner. This opens the RoadRunner Setup dialog where you can specify the RoadRunner project and installation directories. Click OK.

This launches RoadRunner Scenario with the current scene and scenario elements imported automatically from the driving scenario. You can simulate the scenario in RoadRunner and verify that the behavior matches that of the driving scenario.

Exported RoadRunner scenario.

Mapping Driving Scenario Actors to RoadRunner Scenario

This table illustrates the mapping between dynamic actors in driving scenario and their corresponding assets in the exported RoadRunner scenario.

Driving Scenario Class IDDriving Scenario Actor TypeRoadRunner Asset
1CarAssets/ADT Vehicles/SK_Sedan.fbx
2Box TruckAssets/ADT Vehicles/SK_BoxTruck.fbx
3BicycleAssets/Vehicles/Cuboid.rrvehicle
4PedestrianAssets/Characters/Citizen_Male.rrchar
All other class IDsAll other custom dynamic actorsAssets/Vehicles/Cuboid.rrvehicle

Note

To map actors to the right assets, you must have the RoadRunner Asset Library add-on installed. Otherwise, the actors are mapped to the default Cuboid.rrvehicle asset.

Limitations

Exporting a driving scenario to a RoadRunner scenario has these limitations:

  • The driving scenario must have at least one road.

  • Driving scenarios with road groups are not supported.

  • Dynamic actors with reverse motion are not supported.

  • Dynamic actors with spawn and despawn parameters are not supported.

  • Export operation is not supported for Mac platform and MATLAB® Online™.

Export Only Road Network and Static Actors to RoadRunner HD Map file

Instead of exporting the entire driving scenario, you can only export the road network and static actors of a driving scenario as RoadRunner scene elements. This operation generates only a RoadRunner HD Map file. To export a programmatically authored driving scenario to a RoadRunner HD Map file, you can use the export function.

On the app toolstrip, select, Export > RoadRunner HD Map File. This opens the RoadRunner HD Map Export dialog. Specify the path for the exported HD Map file. You can also choose whether to export static actors or not by using the Export Static Actors checkbox.

You can visualize the HD Map using the roadrunnerHDMap object and its plot object function.

rrMap = roadrunnerHDMap;
read(rrMap,'AEB_PedestrianTurning_Farside_50width_15kmh.rrhd')
plot(rrMap)

Exported RoadRunner HD Map for the driving scenario scene.

Mapping Driving Scenario Actors to RoadRunner Scene

This table illustrates the mapping between static actors in driving scenario and their corresponding assets in the exported RoadRunner scene.

Driving Scenario Class IDDriving Scenario Actor TypeRoadRunner Asset
1CarAssets/Vehicles/Sedan.fbx
2Box TruckAssets/ADT Vehicles/SK_BoxTruck.fbx
3BicycleAssets/Vehicles/Cuboid.fbx
4PedestrianAssets/Vehicles/Cuboid.fbx
5BarrierAssets/Vehicles/Cuboid.fbx
All other class IDsAll other custom static actorsAssets/Vehicles/Cuboid.fbx

You must download a cuboid FBX file and place it at Assets/Vehicles/Cuboid.fbx to represent some static actors.

Limitations

Exporting road network and static actors in a driving scenario to RoadRunner HD Map has these limitations:

A RoadRunner Scene Builder license is required to build a scene from the HD map file. Without a RoadRunner Scene Builder license, you can import the HD map file and only view the map as nodes and links in RoadRunner.

Composite Lane Specifications

  • Roads that use composite lane specifications (compositeLaneSpec) and form loops or intersect with themselves are not supported.

  • Composite lane specifications for creating roads with varying widths are not supported

Lane Markings and Lane Type

  • For lane markings created using the laneMarking object and lane types created using the laneType object, only Color name-value argument is supported. Only white and yellow colors are supported.

  • For roads that form loops, multiple lane marking styles are not supported.

Parking Lot

  • Driving scenarios containing parking lots added using the parkingLot function are not supported.

Barriers

  • Barriers with gaps between segments created using the barrier function with SegmentGap name-value argument, are not supported. Such barriers will be laid out without any gaps in the RoadRunner HD map representation.

  • For barriers, setting the SegmentLength, Width, and Height properties are not supported. These properties are calculated automatically based on the asset size during import to RoadRunner.

Static Actors

  • Static actors such as pedestrians and bicycles are not supported. To represent these actors in RoadRunner, you can either download a cuboid FBX and place it under Assets/Vehicles/ or edit the map to point to their own assets.

Road Groups and Road Networks

  • Road junctions and intersections added using the roadGroup function are not supported.

  • Road networks created using the roadNetwork function are not supported when they use road groups.

See Also

|

Related Topics