-
Notifications
You must be signed in to change notification settings - Fork 639
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(distortion_corrector_node): performance tuning #2913
perf(distortion_corrector_node): performance tuning #2913
Conversation
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2913 +/- ##
==========================================
+ Coverage 11.98% 12.17% +0.19%
==========================================
Files 1315 1370 +55
Lines 91518 100422 +8904
Branches 24277 30072 +5795
==========================================
+ Hits 10968 12230 +1262
- Misses 69187 75623 +6436
- Partials 11363 12569 +1206
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
...d_preprocessor/include/pointcloud_preprocessor/distortion_corrector/distortion_corrector.hpp
Outdated
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.
That's a great improvement. Thank you so much.
Just one question from me.
...d_preprocessor/include/pointcloud_preprocessor/distortion_corrector/distortion_corrector.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Takahiro Ishikawa <[email protected]>
...d_preprocessor/include/pointcloud_preprocessor/distortion_corrector/distortion_corrector.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
Accuracy of approximated sin/cos functions are |
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
Signed-off-by: Takahiro Ishikawa <[email protected]>
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
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
@sykwer |
Signed-off-by: Takahiro Ishikawa <[email protected]>
…on#2913) * Avoid unnecessary object instantiation Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Fix: Avoid unnecessary object instantiation Signed-off-by: Takahiro Ishikawa <[email protected]> * Minimize object instantiation Signed-off-by: Takahiro Ishikawa <[email protected]> * Avoid transform computation if possible Signed-off-by: Takahiro Ishikawa <[email protected]> * Pre-compute sin/cos Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Place sincos precompute under util Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Use hardcoded sin values for approcimation Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Use new approximated sin/cos functions Signed-off-by: Takahiro Ishikawa <[email protected]> * Improve accuracy of approximated sin/cos Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Add test for trigonometry Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix * Fix Signed-off-by: Takahiro Ishikawa <[email protected]> * Fix Signed-off-by: Takahiro Ishikawa <[email protected]> * Conform to clang-tidy Signed-off-by: Takahiro Ishikawa <[email protected]> * style(pre-commit): autofix --------- Signed-off-by: Takahiro Ishikawa <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…foundation#2913)" This reverts commit b72ca85. Signed-off-by: tomoya.kimura <[email protected]>
…foundation#2913)" This reverts commit b72ca85.
…tion#2913) (#512) Revert "perf(distortion_corrector_node): performance tuning (autowarefoundation#2913)" This reverts commit b72ca85.
Description
This PR makes
distortion_corrector_node
faster without changing the logical output (slight changes by approximate calculation ofsin/cos
). The processing of thedistortion_corrector_node
gets speeded up from about21ms to 13ms
under the following condition.This PR contains two kinds of changes.
It should be noted that the latter change results in a slight approximation of the logical output.
Related links
Background, Implementation Detail, and Performance Analysis
Tests performed
Check if
distortion_corrector_node
publishes the same logical output as before (using Autoware Universe rosbag simulation).The output is very slightly different in some parts since
sin/cos
is approximated by precomputation.Notes for reviewers
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.