From 157cd34e46f41f7c87361115bfaed20b2b740a94 Mon Sep 17 00:00:00 2001 From: hoangtungdinh <11166240+hoangtungdinh@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:47:57 +0200 Subject: [PATCH] Fix issue in new lane appear rule Signed-off-by: hoangtungdinh <11166240+hoangtungdinh@users.noreply.github.com> --- .../road_lane_link_new_lane_appear.py | 4 +- ...link_new_lane_appear_junction_valid_1.xodr | 9344 +++++++++++++++++ tests/test_semantic_checks.py | 3 + 3 files changed, 9349 insertions(+), 2 deletions(-) create mode 100755 tests/data/road_lane_link_new_lane_appear/road_lane_link_new_lane_appear_junction_valid_1.xodr diff --git a/qc_opendrive/checks/semantic/road_lane_link_new_lane_appear.py b/qc_opendrive/checks/semantic/road_lane_link_new_lane_appear.py index 391ff1d..0126ea0 100644 --- a/qc_opendrive/checks/semantic/road_lane_link_new_lane_appear.py +++ b/qc_opendrive/checks/semantic/road_lane_link_new_lane_appear.py @@ -227,7 +227,7 @@ def _check_appearing_predecessor_road( if current_road is None or predecessor_road is None: return - current_road_last_lane_section = utils.get_last_lane_section(current_road) + current_road_first_lane_section = utils.get_first_lane_section(current_road) predecessor_linkage = utils.get_road_linkage( current_road, models.LinkageTag.PREDECESSOR @@ -253,7 +253,7 @@ def _check_appearing_predecessor_road( _check_predecessor_with_width_zero_between_lane_sections( checker_data, - current_road_last_lane_section, + current_road_first_lane_section, predecessor_road_target_lane_section.lane_section, predecessor_linkage.contact_point, next_lane_section_length, diff --git a/tests/data/road_lane_link_new_lane_appear/road_lane_link_new_lane_appear_junction_valid_1.xodr b/tests/data/road_lane_link_new_lane_appear/road_lane_link_new_lane_appear_junction_valid_1.xodr new file mode 100755 index 0000000..e18dfc1 --- /dev/null +++ b/tests/data/road_lane_link_new_lane_appear/road_lane_link_new_lane_appear_junction_valid_1.xodr @@ -0,0 +1,9344 @@ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +