Skip to content
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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

StepTurtle
Copy link

Description

Port lanelet2-map-tile-generator to autoware_tools with name autoware_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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Barış Zeren <[email protected]>
@StepTurtle StepTurtle mentioned this pull request Oct 4, 2024
5 tasks
@YamatoAndo YamatoAndo self-requested a review October 7, 2024 04:22
Copy link

@wenrir wenrir left a 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.

@wenrir
Copy link

wenrir commented Nov 7, 2024

@StepTurtle thank you for considering my review, I'm not able to resolve my own comments so please feel free to resolve/remove them.

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)
Copy link
Contributor

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.

Copy link
Author

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")
Copy link
Contributor

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.

Copy link
Author

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?

Copy link
Author

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")
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Author

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

@YamatoAndo
Copy link
Contributor

Please fix spell-check.

Thank you!

@StepTurtle
Copy link
Author

Please fix spell-check.

Thank you!

Only one spelling error left in requirements.txt, not sure how can we ignore it.

@YamatoAndo
Copy link
Contributor

Only one spelling error left in requirements.txt, not sure how can we ignore it.

The dictionary is managed in https://github.com/tier4/autoware-spell-check-dict.
If necessary, please submit a PR to the repository to add words.

Please note that this repository might be migrated to another one (https://github.com/autowarefoundation/autoware-spell-check-dict) in the near future.

@StepTurtle
Copy link
Author

Only one spelling error left in requirements.txt, not sure how can we ignore it.

The dictionary is managed in https://github.com/tier4/autoware-spell-check-dict. If necessary, please submit a PR to the repository to add words.

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.

@YamatoAndo
Copy link
Contributor

I think it is not really necessary, if it does not block the PR.

"spell-check-partial" is a mandatory CI check,
so you must pass "spell-check-partial" to merge the PR.

I cannot use it this repo under TIER IV organization.

Sorry about that. I’ve submitted the PR (tier4/autoware-spell-check-dict#833) on your behalf.
Are there any other words you’d like me to add?

@StepTurtle
Copy link
Author

Are there any other words you’d like me to add?

gdal is enough for now, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants