Main Content

Configure RoadRunner Scenario Model

This section shows how to configure a RoadRunner Scenario model where CARLA controls the ego vehicle and RoadRunner Scenario controls the target vehicles.


Before performing this configuration, you must complete the setup steps defined in Set Up CARLA for Cosimulation.

Set Up RoadRunner Scenario Model with Vehicles

Start RoadRunner Scenario.

  1. Create a new project in RoadRunner.

  2. In the dialog box, click New Scene, then New Project, and create or select an empty folder, ProjectFolder, to save your project in.

  3. Select Yes to include the asset library.

  4. Click File > Open Scene, and select ProjectFolder/Scenes/ScenarioBasic.rrscene.

    Scene containing multiple intersections

  5. Switch to scenario editing mode. In the top-right corner of RoadRunner, select Scene Editing, then Scenario Editing.

    Scene and Scenario toggle button

  6. Create a new scenario. Select File > New Scenario.

  7. Place a target vehicle for RoadRunner Scenario to control. From the Library Browser, select the Sedan vehicle asset and drag it to a road in the scene. With the target vehicle selected in the scene, create a path by right-clicking on the roads to specify waypoints.

    Adding Sedan to RoadRunner scene

  8. Place the ego vehicle for CARLA to control. From the Library Browser, select the Compact car vehicle asset and drag it to a road in the scene. With the ego vehicle selected in the scene, create a path by right-clicking on the roads to specify waypoints. In this example, the compact car follows the same path as the sedan.

    Adding compact car to RoadRunner scene

Add CARLA Behavior to Ego Vehicle

In the Library Browser, create a new folder named Behavior in the Vehicles folder. Add a new CARLA behavior by right-clicking in the folder and selecting New > Behavior. Specify the name of the behavior asset as CARLA Behavior. With CARLA Behavior.rrbehavior selected, in the Attributes pane, set these Behavior attributes:

  • PlatformExternal

  • Platform NameCARLA

  • Model location../examples/

You can use the file, included with RoadRunner Scenario, as an example for creating ego vehicle behavior, including speed, path, and set parameters actions, using a CARLA Python® API. For more information on the CARLA Python APIs, see Navigating through waypoints in the CARLA documentation.


Two additional scripts, and, provide sample code for the behaviors of an ego vehicle actor with path-following and a target vehicle actor, respectively. By default, these scripts are located at RoadrunnerInstall\bin\win64\Tools\CARLA\examples on Windows® systems, and RoadRunnerInstall/bin/glnxa64/Tools/CARLA/examples on Linux® systems.

Create and specify CARLA behavior asset

Select the compact car. Assign the CARLA behavior by, in the Attributes pane, dragging the CARLA Behavior.rrbehavior asset to the Vehicle > Behavior field. You can optionally rename the CARLA ego vehicle.

Assign CARLA behavior to ego vehicle

Check and update the actor mapping file RoadrunnerInstall\bin\win64\Tools\CARLA\examples\actors.json, where RoadrunnerInstall is your RoadRunner installation directory, to include your vehicles. By default, the actors.json file includes the sedan, compact, and SUV vehicles. This file serves as a map between the vehicle visualization in RoadRunner Scenario and the simulation in CARLA.

	"Assets/Developer/Vehicles/CompactCar.fbx_rrx": "", 
	"Assets/Developer/Vehicles/CompactCar.fbx": "", 
	"Assets/Vehicles/CompactCar.fbx_rrx": "", 
	"Assets/Vehicles/CompactCar.fbx": "", 
	"Assets/Developer/Vehicles/Sedan.fbx_rrx": "", 
	"Assets/Developer/Vehicles/Sedan.fbx": "",
	"Assets/Vehicles/Sedan.fbx_rrx": "", 
	"Assets/Vehicles/Sedan.fbx": "", 
	"Assets/Developer/Vehicles/Suv.fbx_rrx": "",
	"Assets/Developer/Vehicles/Suv.fbx": "",
	"Assets/Vehicles/Suv.fbx_rrx": "",
	"Assets/Vehicles/Suv.fbx": ""


On Linux systems, the actors.json file is located at RoadRunnerInstall/bin/glnxa64/Tools/CARLA/examples/actors.json

For information on how to run these cosimulations, see Run Cosimulations with CARLA.

See Also

| |