How to find road centers of a road from a loaded map?

2 ビュー (過去 30 日間)
Ashish Kumar Singh
Ashish Kumar Singh 2022 年 3 月 29 日
回答済み: Anurag Ojha 2024 年 1 月 24 日
When we load a map using liveMap, then how we can find out the road centers?
  4 件のコメント
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro 2022 年 3 月 30 日
Can you be more specific? Add an example of what your data is, and what your expected answer would be.
Ashish Kumar Singh
Ashish Kumar Singh 2022 年 3 月 30 日
After importing a geographical road map how can I find out the co-ordinates(mostly end coordinates) of the road imported in the map ??

サインインしてコメントする。

回答 (1 件)

Anurag Ojha
Anurag Ojha 2024 年 1 月 24 日
Hello Ashish
In order to find the road centre, you can use the Automated Driving Toolbox. The toolbox lets you import and work with HERE HD Live Map data and ASAM OpenDRIVE road networks.
After the map is imported, you can obtain the outer and inner road boundaries using the "roadBoundaries" function.
One of the boundaries must be flipped so that the orientation of both boundaries is the same. Once the orientation of the boundaries is the same you can use vector addition to calculate the road centres.
Refer to the example given below:
rb = roadBoundaries(scenario);
outerBoundary = rb{1};
innerBoundary = rb{2};
outerBoundary=flipud(outerBoundary); % flip the outerBoundary so that the boundary orientations are consistent
roadCenter=0.5*(outerBoundary+innerBoundary);
Adding MATLAB documentation links for your reference:

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by