-
Notifications
You must be signed in to change notification settings - Fork 676
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(ndt_scan_matcher): implement tpe sampler in ndt_align_srv #5078
feat(ndt_scan_matcher): implement tpe sampler in ndt_align_srv #5078
Conversation
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>
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>
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>
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>
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>
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>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
I added test on TPE. d56c845 You can test as following commands.
The details of the result are output to directories such as |
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
I added "Summary of Changes" figure to pull request description. |
localization/ndt_scan_matcher/include/ndt_scan_matcher/tree_structured_parzen_estimator.hpp
Show resolved
Hide resolved
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>
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.
@SakodaShintaro This will be my final question.
Once this is resolved, I will be ready to approve.
localization/ndt_scan_matcher/include/ndt_scan_matcher/tree_structured_parzen_estimator.hpp
Show resolved
Hide resolved
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
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5078 +/- ##
==========================================
+ Coverage 14.84% 14.87% +0.03%
==========================================
Files 1649 1652 +3
Lines 114166 114328 +162
Branches 35323 35389 +66
==========================================
+ Hits 16943 17008 +65
- Misses 78102 78155 +53
- Partials 19121 19165 +44
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Just realized that it may be better to change the name of the function |
…arefoundation#5078) * Added output_pose_with_cov_to_log Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added logging particles Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added TreeStructuredParzenEstimator Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed to run TPE Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed initial pose Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed Input type Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed good condition Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed operation if good_num_ == 0 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed cov Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed initial Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use good_threshold_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to count good_num_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed stddev Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed unused functions Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to abs Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * add_trial by result Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed constructor Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed to use n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added kTargetScore Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed constants Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed output_pose_with_cov_to_log Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed a comment Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added a parameter "n_startup_trials" Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * style(pre-commit): autofix * Fixed include guard Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * style(pre-commit): autofix * Fixed hyphen to underscore Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added sample_from_prior Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use log_sum_exp Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed acquisition_function Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to 99% Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed value of n_startup_trials Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed log output Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed default value Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed static distributions Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed PRIOR_WEIGHT Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed order Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added operator* to Input Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Implemented normal tpe Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added is_loop_variable Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Organized PRIOR_WEIGHT Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed PRIOR_WEIGHT 0.0 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added CONVERT_COEFF Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Renamed acquisition_function to compute_log_likelihood_ratio Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Changed random number generator to static variables Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added reference Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed base_stddev_ to a const variable Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use VALUE_WIDTH Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed a comment Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added `n_startup_trials` to README.md Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added a test about tpe Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added the license statement Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Changed default `n_startup_trials` to 20 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed sqrt(2) and added comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added comments 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> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…arefoundation#5078) * Added output_pose_with_cov_to_log Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added logging particles Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added TreeStructuredParzenEstimator Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed to run TPE Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed initial pose Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed Input type Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed good condition Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed operation if good_num_ == 0 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed cov Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed initial Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use good_threshold_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to count good_num_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed stddev Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed unused functions Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to abs Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed parameter Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * add_trial by result Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed constructor Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * FIxed to use n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added kTargetScore Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed constants Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed output_pose_with_cov_to_log Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed a comment Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added a parameter "n_startup_trials" Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * style(pre-commit): autofix * Fixed include guard Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * style(pre-commit): autofix * Fixed hyphen to underscore Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added sample_from_prior Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use log_sum_exp Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed acquisition_function Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to 99% Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials_ Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed value of n_startup_trials Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed log output Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed default value Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed static distributions Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed PRIOR_WEIGHT Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed order Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added operator* to Input Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed parameters Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Implemented normal tpe Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added is_loop_variable Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Organized PRIOR_WEIGHT Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed PRIOR_WEIGHT 0.0 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added CONVERT_COEFF Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed n_startup_trials Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Renamed acquisition_function to compute_log_likelihood_ratio Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Changed random number generator to static variables Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added reference Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed base_stddev_ to a const variable Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed to use VALUE_WIDTH Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Removed a comment Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added `n_startup_trials` to README.md Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added a test about tpe Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Added the license statement Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Changed default `n_startup_trials` to 20 Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp> * Fixed sqrt(2) and added comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added comments Signed-off-by: Shintaro SAKODA <shintaro.sakoda@tier4.jp> * Added comments 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> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
The ndt service for initial position estimation has been changed from random search to search using TPE.
Related links
autowarefoundation/autoware_launch#602
tier4/autoware-spell-check-dict#623
Summary of Changes
Tests performed
Tested by
Evaluation
In AWSIM (Nishishinjuku), the initial pose estimation was performed for each method 200 times, and the final best values of
ndt_align_srv
are obtained.Effects on system behavior
Improves the performance of initial position estimation.
Initial position estimation takes only slightly more time.
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.