Create driving scenario
The drivingScenario
object represents a 3-D
arena containing roads, vehicles, pedestrians, and other aspects of a driving scenario.
Use this object to model realistic traffic scenarios and to generate synthetic
detections for testing controllers or sensor fusion algorithms.
To add roads, use the road
function. To specify
lanes in the roads, create a lanespec
object. You can also import roads from a third-party road
network by using the roadNetwork
function.
To add actors (cars, pedestrians, bicycles, and so on), use the actor
function. To add actors
with properties designed specifically for vehicles, use the vehicle
function. All actors,
including vehicles, are modeled as cuboids (box shapes).
To simulate a scenario, call the advance
function in a loop,
which advances the simulation one time step at a time.
You can also create driving scenarios interactively by using the Driving Scenario
Designer app. In addition, you can export drivingScenario
objects from the app to produce scenario variations for use in either the app or in
Simulink®. For more details, see Create Driving Scenario Variations Programmatically.
creates
an empty driving scenario.scenario
= drivingScenario
sets the scenario
= drivingScenario(Name,Value
)SampleTime
and StopTime
properties using name-value pairs. For example,
drivingScenario('SampleTime',0.1','StopTime',10)
samples
the scenario every 0.1 seconds for 10 seconds. Enclose each property name in
quotes.
[1] You need to enter into a separate agreement with HERE in order to gain access to the HDLM services and to get the required credentials (access_key_id and access_key_secret) for using the HERE Service.