-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(autoware_lanelet2_map_validator): introduce autoware_lanelet2_map_validator #118
feat(autoware_lanelet2_map_validator): introduce autoware_lanelet2_map_validator #118
Conversation
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Removed rclcpp which is unused. Signed-off-by: TaikiYamada4 <[email protected]>
Added validation template Signed-off-by: TaikiYamada4 <[email protected]>
Added yaml input/output for a set of validations Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Fixed mistakes in README.md Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Fixed pre-commit.ci related errors. Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Refactor code style Signed-off-by: TaikiYamada4 <[email protected]>
Delete unused variables Signed-off-by: TaikiYamada4 <[email protected]>
...anelet2_map_validator/src/validators/crosswalk/missing_regulatory_elements_for_crosswalk.cpp
Outdated
Show resolved
Hide resolved
...anelet2_map_validator/src/validators/crosswalk/missing_regulatory_elements_for_crosswalk.cpp
Outdated
Show resolved
Hide resolved
Restrict input/output format. Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
map/autoware_lanelet2_map_validator/docs/crosswalk/regulatory_element_details_for_crosswalks.md
Outdated
Show resolved
Hide resolved
Fixed explanation of issues Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments on this PR, might be completely irrelevant, in that case sorry.
Thank you for your consideration.
} else { | ||
// std::cerr << "Set to default projector: MGRS projector" << std::endl; | ||
return std::make_unique<lanelet::projection::MGRSProjector>(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this branch necessary?
} else { | |
// std::cerr << "Set to default projector: MGRS projector" << std::endl; | |
return std::make_unique<lanelet::projection::MGRSProjector>(); | |
} | |
return std::make_unique<lanelet::projection::MGRSProjector>(); |
@@ -0,0 +1,52 @@ | |||
// Copyright 2023 Autoware Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2023 Autoware Foundation | |
// Copyright 2024 Autoware Foundation |
@@ -0,0 +1,107 @@ | |||
// Copyright 2023 Autoware Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2023 Autoware Foundation | |
// Copyright 2024 Autoware Foundation |
Maybe this should be up-to-date?
@@ -0,0 +1,45 @@ | |||
// Copyright 2023 Autoware Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2023 Autoware Foundation | |
// Copyright 2024 Autoware Foundation |
@@ -0,0 +1,85 @@ | |||
// Copyright 2023 Autoware Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Copyright 2023 Autoware Foundation | |
// Copyright 2024 Autoware Foundation |
Maybe this should be up to date
if (new_it != in_vec.end()) { | ||
iter = new_it; | ||
} else { | ||
break; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the else necessary? as this will break regardless
if (new_it != in_vec.end()) { | |
iter = new_it; | |
} else { | |
break; | |
} | |
if (new_it != in_vec.end()) { | |
iter = new_it; | |
} | |
break; |
const auto & projector = getProjector(config); | ||
map = lanelet::load(cm_config.mapFile, *projector, &errors); | ||
if (!errors.empty()) { | ||
std::cout << "!errors.empty()" << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::cout << "!errors.empty()" << std::endl; |
Seems not relevant outside of debugging?
} | ||
|
||
template <typename T> | ||
void checkPrimitivesType( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[suggestion] could possibly introduce pack expansion for the template template<typename T, typename ... Ts>
to handle expected type / subtype and in that way reduce the duplication.
map/autoware_lanelet2_map_validator/test/src/test_missing_regulatory_elements.cpp
Outdated
Show resolved
Hide resolved
Refined CMakeLists.txt Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Signed-off-by: TaikiYamada4 <[email protected]>
Removed redundant else statement. Removed debug comments Signed-off-by: TaikiYamada4 <[email protected]>
@YamatoAndo @wenrir @wenrir |
map/autoware_lanelet2_map_validator/test/src/test_regulatory_element_details.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: TaikiYamada4 <[email protected]>
Description
This PR adds a new tool
autoware_lanelet2_map_validator
.autoware_lanelet2_map_validator
validates Lanelet2 maps whether it can work with Autoware.Related links
None.
Tests performed
There are two ways to test this tool.
1. colcon test
Run the following command for
colcon test
, (--event-handlers console_cohesion+
is optional).This test should pass 100%.
colcon test --packages-select autoware_lanelet2_map_validator --event-handlers console_cohesion+
2. Test support commands
Check that these two commands work
The print option output like,
3. Run the validator to an actual map with a single validator
You can run this tool with the following command.
validator.name
can be selected from the list you obtained from the--print
command.This is an example of validating the map from the planning_simulator tutorial.
ros2 run autoware_lanelet2_map_validator autoware_lanelet2_map_validator -m ~/autoware_map/sample-map-planning/lanelet2_map.osm -v mapping.crosswalk.regulatory_element_details
Then, you might get
4. Run the validator to an actual map with a requirement set json file
You can run this tool with multiple validators at once. For example, this command will validate "target_lanelet2_map.osm" with the validators listed in autoware_requirement_set.json, and output the results to the current directory.
ros2 run autoware_lanelet2_map_validator autoware_lanelet2_map_validator -m "target_lanelet2_map.osm" -i autoware_requirement_set.json -o ./
If "target_lanelet2_map.osm" is the one from the planning_simulator tutorial, you might get this
If "target_lanelet2_map.osm" is the autoware.universe/common/autoware_test_utils/test_map/lanelet2_map.osm, you might get this
Notes for reviewers
Read the README.md for further information of this tool.
Effects on system behavior
None, because this tool doesn't work with Autoware together.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.