Create a driving scenario containing a curved road, two straight roads, and two actors: a car and a bicycle. Both actors move along the road for 60 seconds.
Create the curved road using road center points following the arc of a circle with an 800-meter radius. The arc starts at 0°, ends at 90°, and is sampled at 5° increments.
Create a driving scenario containing a figure-8 road specified in the world coordinates of the scenario. Convert the world coordinates of the scenario to the coordinate system of the ego vehicle.
Create an empty driving scenario.
scenario = drivingScenario;
Add a figure-8 road to the scenario. Display the scenario.
Actor belonging to a drivingScenario object, specified as an
Actor or Vehicle object. To create these objects, use the
actor and vehicle functions, respectively.
Road boundaries, returned as a cell array. Each cell in the cell array
contains a real-valued N-by-3 matrix representing a road
boundary in the scenario, where N is the number of road
boundaries. Each row of the matrix corresponds to the (x,
y, z) coordinates of a road
boundary vertex.
When the input argument is a driving scenario, the road coordinates are
with respect to the world coordinates of the driving scenario. When the
input argument is an actor, the road coordinates are with respect to the
actor coordinate system.
The figures show the number of road boundaries that
rbdry contains for various road types.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.