How to define rrMap in rodrunnerHDMap as multiple rather than just one
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Pratyush Swain
le 31 Déc 2024
Modifié(e) : Pratyush Swain
le 31 Déc 2024
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Programmatic Scene and Scenario Management dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!