-
Notifications
You must be signed in to change notification settings - Fork 650
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
refactor(perception_rviz_plugin): only delete markers with unused MarkersIDs during updates. #4783
refactor(perception_rviz_plugin): only delete markers with unused MarkersIDs during updates. #4783
Conversation
…kersIDs during updates. Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp>
Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp>
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
@taikitanaka3 @1222-takeshi Could you approve this as a codeowner? |
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
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #4783 +/- ##
=======================================
Coverage 15.09% 15.09%
=======================================
Files 1568 1568
Lines 108130 108128 -2
Branches 33173 33165 -8
=======================================
Hits 16321 16321
- Misses 74031 74037 +6
+ Partials 17778 17770 -8
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
…kersIDs during updates. (autowarefoundation#4783) * refactor(perception_rviz_plugin): only delete markers with unused MarkersIDs during updates. Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> * style(pre-commit): autofix * fix: include <set> for linting test Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> Co-authored-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…kersIDs during updates. (autowarefoundation#4783) * refactor(perception_rviz_plugin): only delete markers with unused MarkersIDs during updates. Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> * style(pre-commit): autofix * fix: include <set> for linting test Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> Co-authored-by: Owen-Liuyuxuan <uken.ryu@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
We have observed issues related to the processing speed of RVIZ (perception plugin) under scenarios with large amounts of detectable objects.
After profiling, we note that PredictedObjectsDisplay clears / re-adds all markers during updates with new messages, and this behavior is related to the increasing processing time.
By only deleting old marker ids not used in the newest frame, and allowing RVIZ to directly modify the old markers instead of re-adding them, this PR should improve the processing efficiency of PredictedObjectsDisplay at scenes with lots of objects.
Related links
Private Profiling Results
Tests performed
The tests are performed on the private ROSbag
Profiling Results:
The "update" function originally takes up (1086 + 8759 + 5006) * 1e-6 = 0.014 seconds on average. Now it takes (803 + 3217) * 1e-6 = 0.004 seconds on average. Selective Delete improved significantly on the time consumed in the update function.
Notice: The time is measured on my personal computer and does not represent the exact runtime on the deployment environment.
Notes for reviewers
Interface changes
This PR will add a public "deleteMarker" method in object_polygon_display_base.hpp.
Effects on system behavior
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.