How to define rrMap in rodrunnerHDMap as multiple rather than just one

조회 수: 4 (최근 30일)
주영
주영 2024년 12월 18일
편집: Pratyush Swain 2024년 12월 31일
I define and use roadrunnerHDMap as rrMap in a single MATLAB script. I want to divide the function called roadrunnerHDMap into several and set up a lane and a lane boundary in each map. Is it possible?
If possible, what are the options?
- example code -
rrMap_1 = roadrunnerHDMap;
rrMap_2 = roadrunnerHDMap;
I defined it as a variable with a different name like the code above, but the results show that both geometry and lane settings are applied the same

답변 (1개)

Pratyush Swain
Pratyush Swain 2024년 12월 31일
편집: Pratyush Swain 2024년 12월 31일
Hi JK,
I understand you want to create unique road runner maps with different geometry settings.
The 'roadrunnerHDMap' function creates an empty RoadRunner HD Map, hence the multiple maps created contain the same properties initially.
You can populate the map with lanes, lane boundaries, lane markings, and junctions using 'roadrunnerHDMap' object properties.
Please refer to the following demo example:
rrMap_1 = roadrunnerHDMap;
rrMap_2 = roadrunnerHDMap;
% Add different geometric boundaries to maps %
rrMap_1.GeographicBoundary=[-0.782 -3.13 0;101.565 50 0];
rrMap_2.GeographicBoundary=[-0.287 -1.31 0;565.101 50 0];
% Add different lanes to maps %
rrMap_1.Lanes(1) = roadrunner.hdmap.Lane(ID="Lane1Map1",Geometry=[0.782 -1.56;50.78 23.43],LaneType="Driving", TravelDirection="Forward");
rrMap_2.Lanes(1) = roadrunner.hdmap.Lane(ID="Lane1Map2",Geometry=[0.287 -1.65;50.87 23.34],LaneType="Driving", TravelDirection="Backward");
The above example shows how to apply different settings like Lane and Geographic Boundary to the roadrunner maps.
You can investigate the map objects 'rrMap_1' and 'rrMap_2' in the workspace to observe their properties, which would have now changed.
For more information, please refer to following documentation:
Hope this helps.

제품


릴리스

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by