-
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
perf(pointcloud_preprocessor): prevent excessive log and speed up a bit #6843
Merged
KYabuuchi
merged 4 commits into
autowarefoundation:main
from
KYabuuchi:fix/remove_excessive_log_in_distortion_corrector
Apr 18, 2024
Merged
perf(pointcloud_preprocessor): prevent excessive log and speed up a bit #6843
KYabuuchi
merged 4 commits into
autowarefoundation:main
from
KYabuuchi:fix/remove_excessive_log_in_distortion_corrector
Apr 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
This reverts commit 984d028.
Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
yukkysaito
approved these changes
Apr 18, 2024
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
4 tasks
YoshiRi
pushed a commit
to tier4/autoware.universe
that referenced
this pull request
May 13, 2024
…it (autowarefoundation#6843) * provide only one warning Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * associate only one time Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * Revert "associate only one time" This reverts commit 984d028. * remove redundant for loop and rclcpp::Time instantiation Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> --------- Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
karishma1911
pushed a commit
to Interplai/autoware.universe
that referenced
this pull request
Jun 3, 2024
…it (autowarefoundation#6843) * provide only one warning Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * associate only one time Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> * Revert "associate only one time" This reverts commit 984d028. * remove redundant for loop and rclcpp::Time instantiation Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp> --------- Signed-off-by: Kento Yabuuchi <kento.yabuuchi.2@tier4.jp>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component:sensing
Data acquisition from sensors, drivers, preprocessing. (auto-assigned)
run:build-and-test-differential
Mark to enable build-and-test-differential workflow. (used-by-ci)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR contains two changes:
RCLCPP_WARN_STREAM_THROTTLE
for a number of pointsfor
loops andrclcpp::Time
class instantiationsRCLCPP_WARN_STREAM_THROTTLE
takes some processing time even if it does not actually output logs, so calling it for a number of points would take a very long time. 😭 In practice, printing once per point cloud is sufficient, so I made that change.The second change provides a slight speedup. In my environment (with about 300,000 points), it resulted in a maximum speedup of about 10 ms.
Also, if the distortion_corrector is delayed for some reason, the following scenario occurs, which is fatal:
RCLCPP_WARN_STREAM_THROTTLE
is called for each point cloud (~300,000 times).RCLCPP_WARN_STREAM_THROTTLE
does not output logs, calling it many times takes a lot of time.When it actually happens, it looks like the image below. This PR resolves this issue.
Tests performed
I ran the logging_simulator on the sample data and measured the processing time. Unfortunately, there was minimal improvement in processing speed with the sample data.
The following graph shows the processing time for two runs before and after the changes. The vertical axis represents processing_time_ms. While there was little effect in the beginning, an improvement can be observed around 80-85 seconds
Also, in my environment (with about 300,000 points), it resulted in a maximum speedup of about 10 ms.
Effects on system behavior
The system behavior does not change.
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.