Parse RoadRunner HDmap lanes centers and road boundaries into a matrix.
4 views (last 30 days)
Show older comments
Hello everyone,
My goal is to parse the HDmap of a road network generated by RoadRunner into a matrix so that it is easier to use in simulation. I am dealing with highway scenarios; thus it is simpler than urban scenarios. A section of the road network I am intrested in is shown below. In creating this merge scenario, I suppose RoadRunner creates several smaller road segments. The HD map was imported using read(rrMap,filename), and inspected. I noticed that I have to manually parse the rrMap.Lanes object to get the data in the desired format. The second figure below shows the parsed data. I put the road boundaries in a matrix (shown using a scatter plot), and I used a cell array with each element containing a matrix for each lane.
I made an attempt to automate the generation for the matrices and cell array described above, but I faced some challenged. I used rrMap.Lanes(i).LaneType to collect and organize the lane's center points and road boundaries. However, I was not able to generate consistent results due to RoadRunner's format. For example, the last figure shows the output from my automated script. Notice that some section of the on-ramp is labeled as a shoulder (blue scatter points), and the on ramp's left boundary is not marked, as the road was labeled as Driving.
I know I am not providing sufficient details on the implementation of my automated script, but I hope you get a general idea of my implementation and the type of nuances I am facing.
Do you guys have any recommendations or guidelines for generating more consistent parsing?



0 Comments
Answers (1)
Harsh
on 7 May 2025
I understand that you are trying to parse the HD map of a road network generated by RoadRunner into a matrix. I noticed that you are using "lane type" information to determine road boundaries; however, this approach is not reliable and may lead to issues similar to the ones you are already facing.
If the ".rrhd" file was generated using RoadRunner, all the adjacent lanes should have shared lane boundaries (i.e., a lane boundary referenced by two lanes). I recommend using this information to determine the road boundaries. Lane boundaries that are referenced by only one lane are typically at the edge of the road.
If the ".rrhd" file was generated using a script, I suggest ensuring that adjacent lanes share lane boundaries.
Additionally, when writing a ".rrhd" file from a script please make sure you are effectively using the predecessor and successor information, as these are important for lane connectivity. If there is no connectivity between two lanes, the scenario may not run as expected.
For reference, you can use the following command in MATLAB to view an example of authoring effective ".rrhd" files:
>> openExample('driving_roadrunner/BuildARoadRunnerHDMapUsingSyntheticDataExample')
I hope this helps. Thanks!
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!