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

Speedup voxel grid build #42

Merged
merged 26 commits into from
Mar 26, 2024
Merged

Conversation

anhnv3991
Copy link

@anhnv3991 anhnv3991 commented Mar 14, 2024

  • Use multithread to build the voxel grid of multigrid NDT omp
  • Execution time of align in a test on shiojiri map
    speedup_voxel_grid_build
  • Execution time of updating NDT in the same test on shiojiri map

speedup_update_ndt

Signed-off-by: anhnv3991 <[email protected]>
anhnv3991 and others added 10 commits March 15, 2024 13:07
* Refactoring multigrid_ndt_omp

Signed-off-by: anhnv3991 <[email protected]>

* Refactored multigrid_ndt_omp

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* Fixed to build

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

* Removed line breaks

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

* For reference, this should be discared later

Signed-off-by: anhnv3991 <[email protected]>

* Testing

Signed-off-by: anhnv3991 <[email protected]>

* Clean up a bit

Signed-off-by: anhnv3991 <[email protected]>

* Clean up a bit

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* refactor: organized ndt params (#43)

* Organized ndt params

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

* style(pre-commit): autofix

---------

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

* Speed up multigrid NDT align (#41)

* Coding

Signed-off-by: anhnv3991 <[email protected]>

* Rearrange the code to avoid duplicated processing

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* Updated reference/result.csv

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

* A minor fix

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

* refactor: organized ndt params (#43)

* Organized ndt params

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

* style(pre-commit): autofix

---------

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

* Coding

Signed-off-by: anhnv3991 <[email protected]>

* Fixed conflicts after rebasing

Signed-off-by: anhnv3991 <[email protected]>

* Coding

Signed-off-by: anhnv3991 <[email protected]>

* Coding

Signed-off-by: anhnv3991 <[email protected]>

* Fixed some bugs

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* Fixed to run workflow

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

---------

Signed-off-by: anhnv3991 <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Co-authored-by: anhnv3991 <[email protected]>
Co-authored-by: Shintaro Sakoda <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>

* fix: add tp to regression test (#44)

* Added tp_score to regression_test

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

* Updated result.csv by result of GitHub Actions

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

* Updated by the latest result

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

---------

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

* fix: add a param use line search (#46)

* Added a parameter "use_line_search"

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

* Added default value use_line_search=false

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

---------

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

* Refactoring multigrid_ndt_omp

Signed-off-by: anhnv3991 <[email protected]>

* Refactored multigrid_ndt_omp

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* Removed line breaks

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

* For reference, this should be discared later

Signed-off-by: anhnv3991 <[email protected]>

* Testing

Signed-off-by: anhnv3991 <[email protected]>

* Clean up a bit

Signed-off-by: anhnv3991 <[email protected]>

* Clean up a bit

Signed-off-by: anhnv3991 <[email protected]>

* Debugging

Signed-off-by: anhnv3991 <[email protected]>

* Fixed a bug

Signed-off-by: anhnv3991 <[email protected]>

* style(pre-commit): autofix

* Fixed build error

Signed-off-by: anhnv3991 <[email protected]>

* Updated result.csv

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

---------

Signed-off-by: anhnv3991 <[email protected]>
Signed-off-by: Shintaro Sakoda <[email protected]>
Signed-off-by: Shintaro SAKODA <[email protected]>
Co-authored-by: anhnv3991 <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
Co-authored-by: Shintaro Sakoda <[email protected]>
Co-authored-by: SakodaShintaro <[email protected]>
Signed-off-by: anhnv3991 <[email protected]>
Signed-off-by: anhnv3991 <[email protected]>
@SakodaShintaro
Copy link

SakodaShintaro commented Mar 21, 2024

@anhnv3991 (cc. @YamatoAndo)
Thank you for fixing the conflict.

There seems to be a mix of factors in this pull request.
I would like to proceed with the pull request in 4 steps.

(1) Refactor radiusSearch -> #49 (Merged)
(2) Minor modifications -> #50 (Merged)
(3) Change LeafID structure -> #48 (Merged)
(4) Multithreading voxel grid building -> This PR

It seems that (3) contribute to speeding up align().
This pull request will help speed up Voxel construction.

Signed-off-by: anhnv3991 <[email protected]>
Signed-off-by: anhnv3991 <[email protected]>
@anhnv3991
Copy link
Author

@SakodaShintaro I fixed all conflicts. Can you please review again?

Copy link

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

Thank you for fixing conflicts.
Please make some corrections.

It might be better to put all the definition code such as get_idle_tid() or sync() in _impl.h instead of .h, but I'll leave it up to you whether do it.

@anhnv3991
Copy link
Author

Thank you for fixing conflicts. Please make some corrections.

It might be better to put all the definition code such as get_idle_tid() or sync() in _impl.h instead of .h, but I'll leave it up to you whether do it.

@SakodaShintaro Those functions are short and called many times so I prefer to keep them inline to minimize the cost of calling.

@SakodaShintaro
Copy link

SakodaShintaro commented Mar 26, 2024

Thank you for correcting the code.
There is no problem with the code, so I will test it carefully.
I will check the following items

  • unit test of ndt_scan_matcher in autoware.universe
  • logging_simulator (sample-rosbag)
  • logging_simulator (AWSIM-rosbag) single map with comparing to GT Pose
  • logging_simulator (AWSIM-rosbag) divided map with comparing to GT Pose
  • driving_log_replayer
  • AWSIM (1 hour, 20 loops OK)

Please wait a moment.

@anhnv3991
Copy link
Author

@SakodaShintaro Thanks a lot!

Copy link

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

Looks Good To Me
Marvelous work!

@anhnv3991 anhnv3991 merged commit 4776042 into tier4/main Mar 26, 2024
1 check passed
@anhnv3991 anhnv3991 deleted the feature/speedup_voxel_grid_build branch March 26, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants