Questions about lane boundary setting and lane overlap

조회 수: 9 (최근 30일)
주영
주영 2024년 10월 11일
답변: Ashok 2024년 10월 25일 7:00
1. Setting the lane boundary
I want to create the left right of laneBoundaries and specify the geometry value and type by creating only the right side.
However, if you code only right and run it, you will get an error.
- contents of error -
Latest check failure: [TransferClusterComputer.cpp(47)] Condition "lane.Object->HasBothBoundariesWithGeometry()" was false.
Why do I get an error if I only create one of the left/rights?
2. lane overlap phenomenon
When you create a lane and run a view in the roadrunner, the overlapping phenomenon occurs.
I don't know why this is again.
Does anyone know these two things?

답변 (1개)

Ashok
Ashok 2024년 10월 25일 7:00
Hi @주영,
When creating a lane in Roadrunner Scene Builder, both the left and right boundaries need to be specified. For symmetric lanes, the unknown lane boundary geometry can be calculated from the lane centreline geometry and the known boundary geometry, as shown in the snippet below.
rrMap = roadrunnerHDMap;
roadCenters = [0 0; 0 50; 0 96; 3 100; 10 100];
rightBoundGeo = [2 0; 2 50; 2 95; 4 98; 10 98];
rrMap.LaneBoundaries(1) = roadrunner.hdmap.LaneBoundary(ID="Left",Geometry=(2*roadCenters)-rightBoundGeo);
rrMap.LaneBoundaries(2) = roadrunner.hdmap.LaneBoundary(ID="Right",Geometry=rightBoundGeo);
rLane = roadrunner.hdmap.Lane(ID="Lane",Geometry=roadCenters,TravelDirection="Forward",LaneType="Driving");
leftBoundary(rLane,"Left",Alignment="Forward");
rightBoundary(rLane,"Right",Alignment="Forward");
rrMap.Lanes = rLane;
If a lane with only one boundary is needed, the geometries of the other lane boundary and the centreline can be set to be the same. For this approach the following line can be changed in the previous snippet.
rrMap.LaneBoundaries(1) = roadrunner.hdmap.LaneBoundary(ID="Left",Geometry=roadCenters);
Regarding the overlap issue, if the input points are very noisy, the default smoothing factor may cause roads to overlap. Adjusting the SmoothingFactor can resolve this issue. More details can be found at the following documentation page on ‘roadrunnerLaneInfo.

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by