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

refactor(ndt_scan_matcher, map_loader): remove map_module #5873

Conversation

SakodaShintaro
Copy link
Contributor

@SakodaShintaro SakodaShintaro commented Dec 14, 2023

Description

This pull request proposes removing map_module. I think this is generally a good change, but I'm open to it being rejected based on discussion.

Context

Currently, there are two modules related to pcd loading in the ndt_scan_matcher package: map_module and map_update_module. These can be switched by setting use_dynamic_map_loading to true/false in the config. (Only one is used at a time).

  • map_module : Has a callback for the map point cloud and sets the incoming point cloud to the NDT InputTarget
  • map_update_module : Has a client for the pcd_loader service and dynamically loads the map. It also has ekf callback and timer callback.

Functionally, map_update_module is upwards compatible, so map_module is no longer necessary.

The map_update_module was introduced in pull request #2339 about a year ago. It has been working stably since then, so I believe now is a good time to fully migrate to using it instead of map_module.

Changes

Removing map_module also requires enable_differential_load to always be true in map_loader, so this pull request also includes a fix for that.

If this pull request is acceptable, I will also modify autoware_launch to remove the parameters.

Related PR

Tests performed

It has been confirmed that the logging_simulator runs with the same accuracy as before on AWSIM data with GT.

Effects on system behavior

map_module will no longer be available. As the function is map_update_module, I don't think there will be any impact.

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.

  • There are no open discussions or they are tracked via tickets.

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

@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:map Map creation, storage, and loading. (auto-assigned) labels Dec 14, 2023
@mitsudome-r
Copy link
Member

mitsudome-r commented Dec 14, 2023

Does this mean that maps without map_config.yaml won't be supported after the removal of map_module?

@SakodaShintaro
Copy link
Contributor Author

@mitsudome-r
Thank you for your comment.
I apologize, I was not aware of the existence of map_config.yaml. After some research, I understand that map_config.yaml is currently not implemented yet and may be used in the future.

I believe that as long as map_config.yaml is properly handled in the map loader, differential_map_loading will run normally. Depending on the implementation at the time, it will be easy to support even without map_config.yaml.
I don't think the changes in this pull request will have any impact about map_config.yaml.

@Motsu-san
Copy link
Contributor

Does this mean that maps without map_config.yaml won't be supported after the removal of map_module?

@SakodaShintaro Simply you said, "No." didn't you?
@mitsudome-r Could you let us know where you worry? Is any slide needed to show that the changes in this pull request doesn't have any impact about map_config.yaml?

@SakodaShintaro
Copy link
Contributor Author

@Motsu-san
Yes. This pull request does not affect map_config.yaml in any way, I think.

@kminoda
Copy link
Contributor

kminoda commented Dec 18, 2023

Assuming that @mitsudome-r's concern was about pointcloud_map_metadata.yaml and not map_config.yaml, the answer is no. Currently, the differential_map_loading I/F from map_loader will be successfully launched when either of the conditions is met:

  1. The pcd is a single file
  2. The pcd file consists of multiple files, and an appropriate pointcloud_map_metadata.yaml is provided

This does not change even if we disable the ROS 2 topic based I/F between ndt_scan_matcher and map_loader.

So, to summarize, a map without pointcloud_map_metadata.yaml will not be supported only if it consists of multiple PCD files, which is also true even before this PR.

@Motsu-san
Copy link
Contributor

@mitsudome-r Does Minoda-san's explanation filled your concerns? Or should we provide an evidence(capture movie?) to prove the following?

So, to summarize, a map without pointcloud_map_metadata.yaml will not be supported only if it consists of multiple PCD files, which is also true even before this PR.

@KYabuuchi
Copy link
Contributor

@KYabuuchi
Copy link
Contributor

pointcloud_map and input_ekf_odom are no longer subscribed. So, please remove them in README.
image

image

Actually, input_ekf_odom was erased in the other PR

Signed-off-by: Shintaro Sakoda <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (6ff47cf) 15.19% compared to head (b6e377a) 15.33%.
Report is 4 commits behind head on main.

Files Patch % Lines
...intcloud_map_loader/pointcloud_map_loader_node.cpp 0.00% 9 Missing ⚠️
...ion/ndt_scan_matcher/src/ndt_scan_matcher_core.cpp 0.00% 1 Missing and 1 partial ⚠️
...ization/ndt_scan_matcher/src/map_update_module.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5873      +/-   ##
==========================================
+ Coverage   15.19%   15.33%   +0.14%     
==========================================
  Files        1749     1750       +1     
  Lines      120942   119937    -1005     
  Branches    36775    36316     -459     
==========================================
+ Hits        18375    18398      +23     
+ Misses      81941    80893    -1048     
- Partials    20626    20646      +20     
Flag Coverage Δ *Carryforward flag
differential 17.54% <0.00%> (?)
total 15.33% <ø> (+0.13%) ⬆️ Carriedforward from fc48450

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mitsudome-r
Copy link
Member

@Motsu-san Thanks. I think @kminoda's explanation answers my concern.

@SakodaShintaro SakodaShintaro merged commit d8767dd into autowarefoundation:main Jan 9, 2024
21 of 25 checks passed
@SakodaShintaro SakodaShintaro deleted the refactor/remove_map_module branch January 9, 2024 03:55
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
…undation#5873)

* Removed use_dynamic_map_loading

Signed-off-by: Shintaro SAKODA <[email protected]>

* Removed enable_differential_load option

Signed-off-by: Shintaro SAKODA <[email protected]>

* style(pre-commit): autofix

* Fixed title

Signed-off-by: Shintaro Sakoda <[email protected]>

* Emphasized lock scope

Signed-off-by: Shintaro Sakoda <[email protected]>

* Removed pointcloud_map and  input_ekf_odom

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro SAKODA <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…undation#5873)

* Removed use_dynamic_map_loading

Signed-off-by: Shintaro SAKODA <[email protected]>

* Removed enable_differential_load option

Signed-off-by: Shintaro SAKODA <[email protected]>

* style(pre-commit): autofix

* Fixed title

Signed-off-by: Shintaro Sakoda <[email protected]>

* Emphasized lock scope

Signed-off-by: Shintaro Sakoda <[email protected]>

* Removed pointcloud_map and  input_ekf_odom

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro SAKODA <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…undation#5873)

* Removed use_dynamic_map_loading

Signed-off-by: Shintaro SAKODA <[email protected]>

* Removed enable_differential_load option

Signed-off-by: Shintaro SAKODA <[email protected]>

* style(pre-commit): autofix

* Fixed title

Signed-off-by: Shintaro Sakoda <[email protected]>

* Emphasized lock scope

Signed-off-by: Shintaro Sakoda <[email protected]>

* Removed pointcloud_map and  input_ekf_odom

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro SAKODA <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
…undation#5873)

* Removed use_dynamic_map_loading

Signed-off-by: Shintaro SAKODA <[email protected]>

* Removed enable_differential_load option

Signed-off-by: Shintaro SAKODA <[email protected]>

* style(pre-commit): autofix

* Fixed title

Signed-off-by: Shintaro Sakoda <[email protected]>

* Emphasized lock scope

Signed-off-by: Shintaro Sakoda <[email protected]>

* Removed pointcloud_map and  input_ekf_odom

Signed-off-by: Shintaro Sakoda <[email protected]>

---------

Signed-off-by: Shintaro SAKODA <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:localization Vehicle's position determination in its environment. (auto-assigned) component:map Map creation, storage, and loading. (auto-assigned) tag: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.

5 participants