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.
Start the RoadRunner simulation, storing the scenario simulation data in OSI format in the osiData
object.
Specify a custom filename for an output binary file, with a .txt
extension, and write the OSI data of the sensor to the OSI trace file.