From e3f969372157889ce3ce65d1e6d80bae913c0bf4 Mon Sep 17 00:00:00 2001 From: TaikiYamada4 Date: Thu, 31 Oct 2024 17:53:19 +0900 Subject: [PATCH 1/5] Add Sobue-san as maintainer of autoware_lanelet2_map_validator Signed-off-by: TaikiYamada4 --- map/autoware_lanelet2_map_validator/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/map/autoware_lanelet2_map_validator/package.xml b/map/autoware_lanelet2_map_validator/package.xml index b147d461..f36ebafe 100644 --- a/map/autoware_lanelet2_map_validator/package.xml +++ b/map/autoware_lanelet2_map_validator/package.xml @@ -5,6 +5,7 @@ 0.1.0 Validation tool for lanelet2 maps especially for Autoware usage Taiki Yamada + Mamoru Sobue Apache License 2.0 ament_cmake_auto From e228c68b39579ec38a0a3b951bff22e623eeb276 Mon Sep 17 00:00:00 2001 From: TaikiYamada4 Date: Fri, 1 Nov 2024 13:25:20 +0900 Subject: [PATCH 2/5] Added maintainers to autoware_lanelet2_map_validator Signed-off-by: TaikiYamada4 --- map/autoware_lanelet2_map_validator/package.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/map/autoware_lanelet2_map_validator/package.xml b/map/autoware_lanelet2_map_validator/package.xml index f36ebafe..d5d16065 100644 --- a/map/autoware_lanelet2_map_validator/package.xml +++ b/map/autoware_lanelet2_map_validator/package.xml @@ -6,6 +6,10 @@ Validation tool for lanelet2 maps especially for Autoware usage Taiki Yamada Mamoru Sobue + Yamato Ando + Masahiro Sakamoto + NGUYEN Viet Anh + Shintaro Sakoda Apache License 2.0 ament_cmake_auto From a001775aba68b748f29b9f27dfe29bfedf524550 Mon Sep 17 00:00:00 2001 From: TaikiYamada4 Date: Fri, 1 Nov 2024 17:52:04 +0900 Subject: [PATCH 3/5] Added vm-02-02 to autoware_requirement_set.json Signed-off-by: TaikiYamada4 --- map/autoware_lanelet2_map_validator/README.md | 2 +- .../autoware_requirement_set.json | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/map/autoware_lanelet2_map_validator/README.md b/map/autoware_lanelet2_map_validator/README.md index f20eab92..cd8ea6f0 100644 --- a/map/autoware_lanelet2_map_validator/README.md +++ b/map/autoware_lanelet2_map_validator/README.md @@ -278,7 +278,7 @@ The "Validators" column will be blank if it hasn't be implemented. | vm-01-17 | Side strip | | | vm-01-18 | Side strip Linestring sharing | | | vm-01-19 | Walkway | | -| vm-02-01 | Stop line alignment | | +| vm-02-01 | Stop line alignment | (Not detectable) | | vm-02-02 | Stop sign | [mapping.stop_line.missing_regulatory_elements](./docs/stop_line/missing_regulatory_elements_for_stop_lines.md) | | vm-03-01 | Intersection criteria | | | vm-03-02 | Lanelet's turn direction and virtual | | diff --git a/map/autoware_lanelet2_map_validator/autoware_requirement_set.json b/map/autoware_lanelet2_map_validator/autoware_requirement_set.json index 6277a712..5dd2edfb 100644 --- a/map/autoware_lanelet2_map_validator/autoware_requirement_set.json +++ b/map/autoware_lanelet2_map_validator/autoware_requirement_set.json @@ -1,5 +1,13 @@ { "requirements": [ + { + "id": "vm-02-02", + "validators": [ + { + "name": "mapping.stop_line.missing_regulatory_elements" + } + ] + }, { "id": "vm-04-01", "validators": [ From ba68faf2e0ec3651937440016792cdb821dfe8b3 Mon Sep 17 00:00:00 2001 From: TaikiYamada4 Date: Fri, 1 Nov 2024 17:56:44 +0900 Subject: [PATCH 4/5] Fixed error of autoware_lanelet2_map_validator template Signed-off-by: TaikiYamada4 --- .../src/validators/validator_template.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/map/autoware_lanelet2_map_validator/src/validators/validator_template.cpp b/map/autoware_lanelet2_map_validator/src/validators/validator_template.cpp index e50644be..42ae2769 100644 --- a/map/autoware_lanelet2_map_validator/src/validators/validator_template.cpp +++ b/map/autoware_lanelet2_map_validator/src/validators/validator_template.cpp @@ -18,7 +18,10 @@ namespace lanelet { namespace validation { +namespace +{ lanelet::validation::RegisterMapValidator reg; +} lanelet::validation::Issues ValidatorTemplate::operator()(const lanelet::LaneletMap & map) { From c82d5487e80eb202d036104720e935659f43b004 Mon Sep 17 00:00:00 2001 From: TaikiYamada4 Date: Fri, 1 Nov 2024 17:57:58 +0900 Subject: [PATCH 5/5] Detect stop lines that are referred as `refers` role. Signed-off-by: TaikiYamada4 --- .../missing_regulatory_elements_for_stop_lines.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/map/autoware_lanelet2_map_validator/src/validators/stop_line/missing_regulatory_elements_for_stop_lines.cpp b/map/autoware_lanelet2_map_validator/src/validators/stop_line/missing_regulatory_elements_for_stop_lines.cpp index 1d48153e..b0d73d9c 100644 --- a/map/autoware_lanelet2_map_validator/src/validators/stop_line/missing_regulatory_elements_for_stop_lines.cpp +++ b/map/autoware_lanelet2_map_validator/src/validators/stop_line/missing_regulatory_elements_for_stop_lines.cpp @@ -63,7 +63,8 @@ MissingRegulatoryElementsForStopLinesValidator::checkMissingRegulatoryElementsFo // Filter regulatory elements whose ref_line type is stop line auto reg_elem_sl = map.regulatoryElementLayer | ranges::views::filter([](auto && elem) { const auto & params = elem->getParameters(); - return params.find(lanelet::RoleNameString::RefLine) != params.end(); + return (params.find(lanelet::RoleNameString::RefLine) != params.end()) || + (params.find(lanelet::RoleNameString::Refers) != params.end()); }); // Get all line strings of stop line referred by regulatory elements @@ -71,6 +72,8 @@ MissingRegulatoryElementsForStopLinesValidator::checkMissingRegulatoryElementsFo for (const auto & elem : reg_elem_sl) { const auto & ref_lines = elem->getParameters(lanelet::RoleName::RefLine); + const auto & refers = + elem->getParameters(lanelet::RoleName::Refers); for (const auto & ref_line : ref_lines) { const auto & attrs = ref_line.attributes(); const auto & it = attrs.find(lanelet::AttributeName::Type); @@ -78,6 +81,13 @@ MissingRegulatoryElementsForStopLinesValidator::checkMissingRegulatoryElementsFo sl_ids_reg_elem.insert(ref_line.id()); } } + for (const auto & ref : refers) { + const auto & attrs = ref.attributes(); + const auto & it = attrs.find(lanelet::AttributeName::Type); + if (it != attrs.end() && it->second == lanelet::AttributeValueString::StopLine) { + sl_ids_reg_elem.insert(ref.id()); + } + } } // Check if all line strings of stop line referred by regulatory elements