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

Improvement of processing speed #64

Open
1 task
Alpaca-zip opened this issue Feb 17, 2024 · 2 comments
Open
1 task

Improvement of processing speed #64

Alpaca-zip opened this issue Feb 17, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Alpaca-zip
Copy link
Owner

Branch

noetic-devel

Description

The two functions that take the most time are projectCloud() and downsampleCloudMsg(), both of which seem to take similar amounts of time. While I can't think of any way to improve the speed of downsampleCloudMsg(), it seems that projectCloud() could benefit from parallel processing with OpenMP.

Additional

Within projectCloud(), the most time consuming processes are processPointsWithBbox() and processPointsWithMask(), with euclideanClusterExtraction() taking about a fifth of the time, which is less than I originally thought.

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@Alpaca-zip Alpaca-zip added the enhancement New feature or request label Feb 17, 2024
@Alpaca-zip Alpaca-zip self-assigned this Feb 17, 2024
@Alpaca-zip
Copy link
Owner Author

Alpaca-zip commented Feb 17, 2024

I've implemented parallel processing using OpenMP in the feature/omp_parallel branch. Testing with the KITTI dataset, the average processing time in syncCallback() improved from 17.5 ms to 14.8 ms, marking an average improvement of 15.5%.

My configuration is as follows:

  • WSL Ubuntu-20.04 ROS Noetic
  • Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz 2.59 GHz
  • 16.0GB RAM
  • NVIDIA GeForce RTX 2060

@h-wata, if you have some time, could you please test it in your environment as well? If you notice a significant improvement and find this change beneficial, I'll consider merging it into the noetic-devel branch.
Thank you for your cooperation.

@h-wata
Copy link

h-wata commented Feb 20, 2024

Thank you for your implementation.
When I set voxel_leaf_size:=0.01, it takes 2.0 seconds to calculate projectCloud() in the noetic-devel. By the way, in the feature/omp_parallel branch, it takes between 0.6 to 0.7 seconds.
Furthermore, the CPU usage is three times higher than in the noetic-devel when three objects are shown.

image

However, this setting is quite aggressive. With the default setting of 0.1, both branches should have no problem regarding computation time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants