Welcome, everyone.
In this video, you will learn how
to programmatically build a 3D Scene for a real highway road.
3D Scenes enable you to simulate and test
Automated Driving Systems.
First, you will extract data for a stretch of highway,
and build a High-Definition Map.
You do this using MATLAB functions from the Automated
Driving Toolbox.
Next, you write the map to your file
and import it into RoadRunner.
Finally, you build a 3D Scene from the imported file
using RoadRunner Scene Builder.
To get the data for a highway from the real world,
you begin with the latitude and longitude coordinates near it.
Use the hereHDLMReader to read road data at these coordinates,
using the HERE HD Live Map service.
The map data from HERE consists of different layers.
The TopologyGeometry layer gives you
geometric data for all the links and nodes that form the roads.
You can plot and visualize these links and nodes.
For simplicity of this example, you
select one link for building the 3D Scene.
The link is a highway, and has a yield sign associated with it.
A yield sign is typically present at locations
where an entrance ramp merges into a highway.
To find this highway link, you use the SpeedAttributes layer.
First, you find all the links with a forward direction
of travel, and speed limit greater than 100 kilometers
per hour or 62 miles per hour.
These are the highway links.
Next, you use the LocalizationSign layer
to find the first highway link with a triangle shaped traffic
sign that runs less than a kilometer long.
A triangle shape is typical for a yield sign.
Finally, you visualize the selected highway,
all the signs on this highway, and the yield sign of interest.
So you have selected a stretch of highway
and want to build a 3D Scene for it.
To do this, you will use the RoadRunner Scene Builder
product that can automatically generate 3D road
models from HD Maps.
First, you need to create an HD Map representation
for your highway that the RoadRunner Scene
Builder can understand.
Use additional layers for lanes and barriers
to get detailed data for the highway.
Then, create a RoadRunner HD Map for the highway,
by populating the lanes, lane boundaries, markings, barriers,
and signs.
Note that the map can reference any assets you
have built using RoadRunner or acquired using the RoadRunner
asset library to reproduce realistic 3D objects.
You can plot the map to verify the representation.
Finally, write the map to your file with extension .rrhd,
using the write method on the map object.
The file you wrote can be dragged and dropped
into the RoadRunner library browser, and then to the Editor
to import it.
Then, you use the RoadRunner Scene Builder tool
to build a 3D Scene for it.
You can see the lanes, lane markings, barriers, and signs
of the selected highway.
Today, you saw a simple example of how to programmatically read
real road data and build realistic 3D
Scenes for selected areas.
Give it a try, and enjoy creating beautiful 3D Scenes
for your automated driving projects.
Thanks for watching.