-
Notifications
You must be signed in to change notification settings - Fork 682
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
fix(ndt_scan_matcher): fix map_update_module structure #5915
fix(ndt_scan_matcher): fix map_update_module structure #5915
Conversation
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
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.
Thanks for your contribution. Please check my following comments. 🙏
localization/ndt_scan_matcher/include/ndt_scan_matcher/ndt_scan_matcher_core.hpp
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5915 +/- ##
==========================================
+ Coverage 15.28% 15.32% +0.03%
==========================================
Files 1749 1747 -2
Lines 120356 119816 -540
Branches 36708 36305 -403
==========================================
- Hits 18401 18356 -45
+ Misses 81305 81092 -213
+ Partials 20650 20368 -282
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Also, the
I made it atomic. Please let me know if there is any misunderstanding. (When I made it an atomic variable, I got a warning from clang-tidy if I didn't initialize it in the member initializer lists, so I changed the initialization location.) |
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.
LGTM
I think the two additional exclusivity controls make sense. 👍 (for is_activated_
and latest_ekf_position_
)
553f1f2
into
autowarefoundation:main
…ation#5915) * Refactored map_update_module Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Rename a variable and add comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Change the order of if statements Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Fixed to constexpr Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added latest_ekf_position_mtx_ Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Changed is_activated_ to atomic Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> --------- Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
…ation#5915) * Refactored map_update_module Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Rename a variable and add comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Change the order of if statements Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Fixed to constexpr Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added latest_ekf_position_mtx_ Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Changed is_activated_ to atomic Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> --------- Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
…ation#5915) * Refactored map_update_module Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Rename a variable and add comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Change the order of if statements Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Fixed to constexpr Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added latest_ekf_position_mtx_ Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Changed is_activated_ to atomic Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> --------- Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
…ation#5915) * Refactored map_update_module Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Rename a variable and add comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Change the order of if statements Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Fixed to constexpr Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added latest_ekf_position_mtx_ Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Changed is_activated_ to atomic Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> --------- Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp>
Description
In this pull request, the structure of
map_update_module
inndt_scan_matcher
has been changed to optimize processing.Context
(1) Currently,
map_update_module
continuously outputs ERROR logs due to its inability to subscribe to ekf odometry untilndt_scan_matcher
estimates the initial pose. Outputting ERROR in this normal sequence is not ideal. To avoid this, a structural change was required becausemap_update_module
needs to check the state ofndt_scan_matcher
.(2) Upon reviewing the code, I identified another issue:
map_update_module
subscribes to ekf odometry independently ofndt_scan_matcher
. This redundancy is inefficient. Given that the ekf odometry topic is published at 50Hz, subscribing to it twice could negatively impact CPU usage.(3) Also, because
map_update_module
creates callback groups in its constructor, it is difficult to understand how many callback groups there were in the entirendt_scan_matcher
.Changes
ndt_scan_matcher_core.cpp
.map_update_module
to no longer manage the current location and focus only on updating the map.Tests performed
The logging_simulator has been verified to run with the same accuracy as before on AWSIM data with GT. It also performs well when dynamic_map_loading is used for divided maps.
Effects on system behavior
There are no large effects on system behavior. There is a possibility that the CPU load has improved slightly because EKF's double subscription is eliminated.
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.