asam-ev / qc-opendrive

Mozilla Public License 2.0
7 stars 1 forks source link

Incorrect error reporting for "road_lane_link_new_lane_appear" check #101

Closed DavideFarina96 closed 1 week ago

DavideFarina96 commented 2 weeks ago

Describe the bug The asam.net:xodr:1.4.0:road.lane.link.new_lane_appear rule checks whether a predecessor or successor lane with zero width has incorrect linking. If such a problem is found, then an error is reported. However, the reported error does not take into consideration whether the lane in question was a predecessor or a successor.

Both functions (_check_successor_with_width_zero_between_lane_sections and _check_predecessor_with_width_zero_between_lane_sections) call the _raise_issue function, which logs two messages:

While this is correct for the function handling the successor case, it is incorrect for the other one, handling the predecessor case. In other words, the error message sometimes states that the successor lane is the one with width zero, even when it is actually the predecessor lane which has width zero.

Example

        Error:      #0: If a new lane appears besides, only the continuing lane shall be connected to the original lane, not the appearing lane.
                       ruleUID: asam.net:xodr:1.4.0:road.lane.link.new_lane_appear
                    Lane with successors with width zero.
                       XPath: /OpenDRIVE/road[503]/lanes/laneSection/right/lane[2]
                       File: row=39836 column=0
                    Successor lane with width zero.
                       XPath: /OpenDRIVE/road[1599]/lanes/laneSection/right/lane[2]
                       File: row=119749 column=0

The above log is an example of the logged error. However, the correct message should read "Lane with predecessors with width zero" and "Predecessor lane with width zero", for this case.

To Reproduce I am unfortunately unable to share an OpenDRIVE file which triggers this error, however I believe that it should be possible to diagnose and solve this issue even without an example.

Expected behavior I would expect to receive different messages based on whether the lane in question is predecessor or successor of the lane being analyzed.

Docker version This was done with the latest available provided docker, pulled today (September 18th 2024)

AsamDiegoSanchez commented 1 week ago

According to IVEX the issue can be closed (added to already merged PR #104).