Add road network to driving scenario
roadNetwork(
uses the name-value pair scenario
,'OpenDRIVE','ShowLaneTypes',showLaneTypes
)'ShowLaneTypes'
to also import lane
type information from the file and display it in the driving scenario.
OpenDRIVE Import Limitations
You can import only lanes, lane type information, and roads. The import of road objects and traffic signals is not supported.
OpenDRIVE files containing large road networks can take up to several minutes to load. Examples of large road networks include ones that model the roads of a city or ones with roads that are thousands of meters long.
Lanes with variable widths are not supported. The width is set to the highest width found within that lane. For example, if a lane has a width that varies from 2 meters to 4 meters, the function sets the lane width to 4 meters throughout.
Roads with lane type information specified as driving
,
border
, restricted
,
shoulder
, and parking
are supported.
Lanes with any other lane type information are imported as border lanes.
Roads with multiple lane marking styles are not supported. The function
applies the first found marking style to all lanes in the road. For example, if
a road has Dashed
and Solid
lane markings,
the function applies Dashed
lane markings throughout.
Lane marking styles Bott Dots
, Curbs
,
and Grass
are not supported. Lanes with these marking styles
are imported as unmarked.
HERE HD Live Map Import Limitations
When importing HERE HDLM data, these road and lane features are not supported:
Lanes with varying widths — In the generated road network, each lane is set to have the maximum width found along its entire length. Consider a HERE HDLM lane with a width that varies from 2 to 4 meters along its length. In the generated road network, the lane width is 4 meters along its entire length.
Roads with varying numbers of lanes along their lengths — In the generated road network, each road is set to have the maximum number of lanes along its entire length. Consider a HERE HDLM road with 3 lanes on one half and 2 lanes on the other half. In the generated road network, the road has 3 lanes along its entire length.
Multiple lane marking styles along a lane — In the generated road network, each lane is set to have the marking style of the lane segment with the maximum width along the road. Consider a HERE HDLM lane with 2 lane segments. The first lane segment is 2 meters wide and has solid markings. The second lane segment is 4 meters wide and has dashed markings. In the generated road network, the lane has a fixed width of 4 meters throughout and dashed markings along its entire length.
These modifications to the road networks can sometimes cause roads to overlap in the driving scenario. Consider the HERE HDLM roads for the divided highway highlighted in blue in the table. Due to the unsupported features, in the imported driving scenario, the lane widths of the roads increase. This limitation causes the roads to overlap and appear as one road. Sensors that detect lanes are unable to detect the covered lanes.
HERE HDLM Road Network | Imported Driving Scenario |
---|---|
|
|
If you receive a warning that the geometry of a road is unable to be computed, then the curvature of the road is too sharp for it to render properly and it is not imported.
OpenStreetMap Import Limitations
When importing OpenStreetMap data, road and lane features have these limitations:
Lane-level information is not imported from OpenStreetMap roads. Lane specifications are based only on the direction of travel specified in the OpenStreetMap road network, where:
One-way roads are imported as single-lane roads with default lane
specifications. These lanes are programmatically equivalent to lanespec
(1)
.
Two-way roads are imported as two-lane roads with bidirectional travel
and default lane specifications. These lanes are programmatically
equivalent to lanespec
([1 1])
.
The table shows these differences in the OpenStreetMap road network and the road network in the imported driving scenario.
OpenStreetMap Road Network | Imported Driving Scenario |
---|---|
When importing OpenStreetMap road networks that specify elevation data, if elevation data is not specified for all roads being imported, then the generated road network might contain inaccuracies and some roads might overlap.
The basemap used in the app can have slight differences from the map used in the OpenStreetMap service. Some imported road issues might also be due to missing or inaccurate map data in the OpenStreetMap service. To check whether the data is missing or inaccurate due to the map service, consider viewing the map data on an external map viewer.
If you receive a warning that the geometry of a road is unable to be computed, then the curvature of the road is too sharp for it to render properly and it is not imported.
If the roads that you import do not look as expected, consider importing them
by using the Driving Scenario Designer app. The
app can make the process of troubleshooting and correcting roads easier than
trying to troubleshoot and correct them by using the
roadNetwork
function.
[1] Dupuis, Marius, et al. OpenDRIVE Format Specification. Revision 1.4, Issue H, Document No. VI2014.106. Bad Aibling, Germany: VIRES Simulationstechnologie GmbH, November 4, 2015.
[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.