-
Notifications
You must be signed in to change notification settings - Fork 34
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. |
map/autoware_lanelet2_divider/autoware_lanelet2_divider/xml_tool/xml_tool.py
Show resolved
Hide resolved
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.
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.
If I understand correct, this commit should fix this problem: bbb88cb
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.
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.
@ataparlar Do you have any idea on that?
We are adding version tag because osmium tool returns an error if there is missing tag, but I am not sure on the these numbers?
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.
@ataparlar Do you have any idea on that?
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?
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.
It creates a temp osm and remove end of the tool.
related commit: 574564a
Please fix spell-check. Thank you! |
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
…oware_tools into feat/add_lanelet2_divider
Signed-off-by: Barış Zeren <[email protected]>
Signed-off-by: Barış Zeren <[email protected]>
Only one spelling error left in |
The dictionary is managed in https://github.com/tier4/autoware-spell-check-dict. Please note that this repository might be migrated to another one (https://github.com/autowarefoundation/autoware-spell-check-dict) in the near future. |
I think it is not really necessary, if it does not block the PR. Otherwise I wanna ask you to add this word with easy-to-add-a-word-using-workflow, because I cannot use it this repo under TIER IV organization. |
"spell-check-partial" is a mandatory CI check,
Sorry about that. I’ve submitted the PR (tier4/autoware-spell-check-dict#833) on your behalf. |
|
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.