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

fix(ground_segmentation): add omp parallel for #5791

Conversation

badai-nguyen
Copy link
Contributor

@badai-nguyen badai-nguyen commented Dec 6, 2023

Description

🤖[deprecated] Generated by Copilot at 5cb8eab

This pull request enhances the scan_ground_filter_nodelet class in the perception/ground_segmentation package by parallelizing and refactoring its point cloud processing logic. It uses OpenMP to speed up the classification of points into ground and non-ground segments, and it simplifies the input and output of some functions by using vectors of point indices.

Related Link

TIER IV INTERNAL LINK

Tests performed

I've tested by logging_simulator on my PC using sample-rosbag and internal bus rosbag and confirmed the processing time of ground_segmentation is decreased.

- Current After change
sample-rosbag image image
Bus rosbag image image

I've also tested on the test bench pc for xx1 and the result shows that with suitable omp_set_num_threads or without set omp_set_num_threads, the processing_time is improved 22%.

OMP setup scan_ground_segmentation processing_time average
no OMP image 45ms
OMP omp_set_num_threads: 1 image 45ms
OMP omp_set_num_threads: 2 image 40ms
omp_set_num_threads: 10threads image 35m
omp_set_num_threads no set image 35ms

Effects on system behavior

Not applicable.

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.

Signed-off-by: badai-nguyen <[email protected]>
Signed-off-by: badai-nguyen <[email protected]>
@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Dec 6, 2023
@badai-nguyen badai-nguyen requested a review from YoshiRi December 6, 2023 02:43
Copy link

stale bot commented Feb 4, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Feb 4, 2024
@miursh
Copy link
Contributor

miursh commented Feb 6, 2024

@badai-nguyen do you have any plans for this PR, or should we close it for now?

@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Feb 6, 2024
@badai-nguyen
Copy link
Contributor Author

badai-nguyen commented Feb 26, 2024

@miursh I'm sorry for missed your mention. I updated the result I tested this PR on Bench PC which shows the decrease of processing_time so I will open it and hope can merge this PR. Could you review or assign someone to review it?

@badai-nguyen badai-nguyen marked this pull request as ready for review February 26, 2024 00:01
@badai-nguyen badai-nguyen added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 26, 2024
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 14.65%. Comparing base (b86a00d) to head (696d2c3).
Report is 534 commits behind head on main.

Files Patch % Lines
...nd_segmentation/src/scan_ground_filter_nodelet.cpp 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5791   +/-   ##
=======================================
  Coverage   14.64%   14.65%           
=======================================
  Files        1899     1899           
  Lines      130282   130278    -4     
  Branches    38311    38303    -8     
=======================================
+ Hits        19083    19087    +4     
+ Misses      89784    89782    -2     
+ Partials    21415    21409    -6     
Flag Coverage Δ *Carryforward flag
differential 34.30% <71.42%> (?)
total 14.64% <ø> (-0.01%) ⬇️ Carriedforward from b86a00d

*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.

@YoshiRi YoshiRi marked this pull request as draft April 5, 2024 01:29
Copy link

stale bot commented Jun 5, 2024

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants