Skip to content

Commit

Permalink
Fix road new lane appear issue message to take linkage tag into accou…
Browse files Browse the repository at this point in the history
…nt (#103)

Signed-off-by: patrickpa <[email protected]>
Signed-off-by: Patrick Abrahão <[email protected]>
  • Loading branch information
patrickpa authored and hoangtungdinh committed Sep 25, 2024
1 parent cab3908 commit fc9ba19
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions qc_opendrive/checks/semantic/road_lane_link_new_lane_appear.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
def _raise_issue(
checker_data: models.CheckerData,
lane: etree._Element,
successor_width_zero_lane: etree._Element,
width_zero_lane: etree._Element,
issue_severity: IssueSeverity,
linkage_tag: models.LinkageTag,
) -> None:
issue_id = checker_data.result.register_issue(
checker_bundle_name=constants.BUNDLE_NAME,
Expand All @@ -36,15 +37,15 @@ def _raise_issue(
checker_id=CHECKER_ID,
issue_id=issue_id,
xpath=checker_data.input_file_xml_root.getpath(lane),
description="Lane with successors with width zero.",
description=f"Lane with {linkage_tag.value} with width zero.",
)

checker_data.result.add_xml_location(
checker_bundle_name=constants.BUNDLE_NAME,
checker_id=CHECKER_ID,
issue_id=issue_id,
xpath=checker_data.input_file_xml_root.getpath(successor_width_zero_lane),
description="Successor lane with width zero.",
xpath=checker_data.input_file_xml_root.getpath(width_zero_lane),
description=f"{linkage_tag.value.capitalize()} lane with width zero.",
)


Expand Down Expand Up @@ -92,6 +93,7 @@ def _check_successor_with_width_zero_between_lane_sections(
lane,
successor_lane,
IssueSeverity.ERROR,
models.LinkageTag.SUCCESSOR,
)


Expand Down Expand Up @@ -139,6 +141,7 @@ def _check_predecessor_with_width_zero_between_lane_sections(
lane,
predecessor_lane,
IssueSeverity.ERROR,
models.LinkageTag.PREDECESSOR,
)


Expand Down Expand Up @@ -340,6 +343,7 @@ def _check_appearing_successor_junction(
current_road_lane,
connection_lane,
IssueSeverity.ERROR,
models.LinkageTag.SUCCESSOR,
)


Expand Down Expand Up @@ -423,6 +427,7 @@ def _check_appearing_predecessor_junction(
current_road_lane,
connection_lane,
IssueSeverity.ERROR,
models.LinkageTag.PREDECESSOR,
)


Expand Down

0 comments on commit fc9ba19

Please sign in to comment.