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(map_projection_loader): add map_projection_loader #3986

Merged

Conversation

kminoda
Copy link
Contributor

@kminoda kminoda commented Jun 15, 2023

Description

This PR adds map_projection_loader that loads the map projection info and publishes it as /map/map_projector_type. The topic will be subscribed by /map/lanelet2_map_loader.

Importantly, the interface for map files will change with this PR. Autoware will require map_projector_info.yaml as an additional file that stores the projection info. To maintain backward compatibility, we also support maps without the yaml file, but note that this will evoke a deprecated warning. For details, please refer to the readme of map_projection_loader which is added in this PR.

Related links

Should be merged with:

Related links:

Tests performed

Unit test & Integration test

I have added some unit test and integration test under map/map_projection_loader/test.

Testing with logging_simulator

I also tested the following

  • [backward-compatibility test] Confirmed that localization works with sample-map-rosbag provided in Autoware tutorial.
  • [MGRS test from YAML] Prepare the following map_projector_info.yaml in sample-map-rosbag directory, launch logging_simulator, and confirmed that it works.

map_projector_info.yaml for sample-map-rosbag:

type: MGRS
mgrs_grid: 54SUE

Testing with planning_simulator

I also tested planning_simulator with sample-map-planning provided in Autoware tutorial.

Notes for reviewers

Transverse Mercator projection is not yet supported only with this PR, but we also need to add #3984. I split PRs into two to maintain each PR as small as possible, but let me know if it's better to merge these at once. (Currently, I am considering merging this PR first and then open the PR)

Interface changes

Map files requirement will change, although backward compatibility is also supported

Effects on system behavior

None except the above interface change.

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: kminoda <koji.minoda@tier4.jp>
@github-actions github-actions bot added the component:map Map creation, storage, and loading. (auto-assigned) label Jun 15, 2023
pre-commit-ci bot and others added 5 commits June 15, 2023 10:20
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Jun 16, 2023
@github-actions github-actions bot added the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Jul 20, 2023
pre-commit-ci bot and others added 6 commits July 20, 2023 07:07
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
kminoda and others added 3 commits July 24, 2023 11:16
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda kminoda added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jul 24, 2023
pre-commit-ci bot and others added 3 commits July 24, 2023 02:25
@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) labels Jul 24, 2023
kminoda and others added 6 commits August 4, 2023 15:44
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@YamatoAndo
Copy link
Contributor

@kminoda please fix build error

__w/autoware.universe/autoware.universe/map/map_projection_loader/src/map_projection_loader.cpp:35:5: error: continue statement not within a loop
35 | continue; // do nothing

Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda
Copy link
Contributor Author

kminoda commented Aug 7, 2023

@YamatoAndo Thank you 🙏
Fixed 0702af6

@YamatoAndo
Copy link
Contributor

I have confirmed that Autoware works well with the logging_simulator/planning_simulator.
I have also confirmed that the /map/map_projector_type topic is being output as intended.

Signed-off-by: kminoda <koji.minoda@tier4.jp>
@kminoda
Copy link
Contributor Author

kminoda commented Aug 9, 2023

@YamatoAndo @mitsudome-r Hi, I've reflected all the comments! Would you mind checking the PR and approve if it looks OK?

@mitsudome-r mitsudome-r enabled auto-merge (squash) August 10, 2023 01:31
@mitsudome-r mitsudome-r disabled auto-merge August 10, 2023 01:34
@kminoda kminoda enabled auto-merge (squash) August 10, 2023 01:50
@kminoda kminoda disabled auto-merge August 10, 2023 01:50
@kminoda kminoda merged commit 8ff2128 into autowarefoundation:main Aug 10, 2023
LeoDriveProject pushed a commit to leo-drive/autoware.universe.golf that referenced this pull request Aug 16, 2023
…ation#3986)

* feat(map_projection_loader): add map_projection_loader

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* Update default algorithm

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix test

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* add readme

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* fix launch file and fix map_loader

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* update lanelet2

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fill yaml file path

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* update readme

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* minor fix

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* fix test

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* add include guard

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* update test

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* update map_loader

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* update docs

* style(pre-commit): autofix

* update

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* add dependency

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* remove unnecessary parameter

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* update

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* update test

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* add url

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* enable python tests

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* small fix

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix grammar

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* remove transverse mercator

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* add rule in map

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix readme of map loader

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* remove transverse mercator for now

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* add utm

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* remove altitude from current projection loader

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

* fix pre-commit

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix build error

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix: remove package.xml

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* fix clang-tidy

Signed-off-by: kminoda <koji.minoda@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: kminoda <koji.minoda@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
@kminoda kminoda deleted the feat/add_map_projection_loader branch August 23, 2023 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) component:map Map creation, storage, and loading. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants