asam-ev / qc-opendrive

Mozilla Public License 2.0
7 stars 1 forks source link

Incorrect error raised by rule 106 when road reference line direction changes between roads #61

Closed DavideFarina96 closed 1 month ago

DavideFarina96 commented 2 months ago

Describe the bug Rule 106 ("road.lane.link.new_lane_appear") states that when a new lane appears in a new road or lane section, if it has zero-width, it shall not have a predecessor or successor, depending on which side has zero width.

From my testing, it seems like a bug is present in situations in which the following characteristics are present:

In this situation, the width of the wrong "side" (start vs end) of the road appears to be used for the check, triggering errors even in situations in which the linking is correct. It is possible that the implementation is not taking into consideration the fact that, if the reference line direction changes between two roads, the relation between predecessors and successors changes.

A screenshot describing the situation has been attached below. The OpenDRIVE shown in the picture can be found here: lane_linking_bug_example.zip (uploaded as zip as GitHub does not let me upload .xodr files)

In the Report.txt file, the indicated error is as follows:

        Error:      #0: If a new lane appears besides, only the continuing lane shall be connected to the original lane, not the appearing lane.
                    Lane with successors with width zero.
                       XPath: /OpenDRIVE/road[1]/lanes/laneSection/left/lane[1]
                    Successor lane with width zero.
                       XPath: /OpenDRIVE/road[2]/lanes/laneSection/right/lane[3]

To Reproduce Steps to reproduce the behavior:

  1. Get an OpenDRIVE file with the characteristics described above
  2. Run the checker including rule 106
  3. Open the Report.txt file
  4. Notice that an error is being indicated, even though the OpenDRIVE does not have linking issues

Expected behavior No errors should be raised for this situation, as this is compliant with the OpenDRIVE standard

Screenshots

lane_link_bug

Bundle

hoangtungdinh commented 1 month ago

Thanks @DavideFarina96 for the very detailed explanation and the example files to reproduce the problem.

We fixed this issue in #63.