Create a roadrunner
object to launch the RoadRunner application, which then connects to the project folder at the specified path.
Open the scenario file TrajectoryCutIn.rrscenario
. This scenario is included with the RoadRunner Scenario application.
Create scenarioSim
, a ScenarioSimulation
object, to connect MATLAB® to the RoadRunner Scenario simulation.
Create sensorSim
, a RoadRunner SensorSimulation
object, to control the sensor configuration for the RoadRunner Scenario simulation.
Configure the sensor model for a radar sensor, to add to the ego vehicle, using a drivingRadarDataGenerator
object.
Add the sensor to the ego vehicle actor in the RoadRunner scenario. Specify the Actor
ID
property of the vehicle.
Create osiData
, a RoadRunner openSimulationInterface
object to store RoadRunner Scenario simulation data in OSI format.
Use the ScenarioSimulation
object, to step through the RoadRunner scenario, and get the OSI protocol buffer message from the openSimulationInterface
object at each simulation step.