-
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_divider): add lanelet2 divider tool #130
base: main
Are you sure you want to change the base?
feat(autoware_lanelet2_divider): add lanelet2 divider tool #130
Conversation
Signed-off-by: Barış Zeren <[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.
Some minor comments that might be irrelevant (please ignore if so), thank you for your consideration.
map/autoware_lanelet2_divider/autoware_lanelet2_divider/osmium_tool/osmium_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/osmium_tool/osmium_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/osmium_tool/osmium_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/osmium_tool/osmium_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/osmium_tool/osmium_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/data_preperation/data_preperation.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/data_preperation/data_preperation.py
Outdated
Show resolved
Hide resolved
map/autoware_lanelet2_divider/autoware_lanelet2_divider/autoware_lanelet2_divider.py
Show resolved
Hide resolved
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
@StepTurtle thank you for considering my review, I'm not able to resolve my own comments so please feel free to resolve/remove them. |
return True | ||
|
||
|
||
def complete_missing_version_tag(input_osm_file_path: str): |
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.
What is the purpose of adding a version tag?
whole_map_xml = ET.parse(input_osm_file_path) | ||
whole_map_root = whole_map_xml.getroot() | ||
|
||
add_version = any(root_element != "version" for root_element in whole_map_root.attrib) |
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.
Why is it set to update as long as even one non-version element is found?
In this code, it updates even if there is a version tag, as long as there are other elements present.
add_version = any(root_element != "version" for root_element in whole_map_root.attrib) | ||
|
||
if add_version: | ||
whole_map_root.set("version", "0.6") |
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.
Why is the version fixed to 0.6?
I’d like to know the reason for choosing 0.6.
add_version = False | ||
break | ||
if add_version: | ||
element.set("version", "1") |
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.
Why is the version fixed to 1?
And I’d like to understand the reason behind adding the version tag to each element. Why?
if add_version: | ||
element.set("version", "1") | ||
|
||
whole_map_xml.write(input_osm_file_path, encoding="utf-8", xml_declaration=True) |
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.
Please avoid directly modifying the input file.
Could you revise the implementation to create a new temporary file instead?
Description
Port lanelet2-map-tile-generator to
autoware_tools
with nameautoware_lanelet2_divider
.cc. @ataparlar @YamatoAndo
Related links
Tests performed
Notes for reviewers
Interface changes
Effects on system behavior
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.