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

feat(tier4_state_rviz_plugin): change to read topic by polling #7492

Conversation

Autumn60
Copy link
Contributor

@Autumn60 Autumn60 commented Jun 14, 2024

Description

Based on the discussion, change tier4_state_rviz_plugin to read topic by polling instead of best_effort callback.

During this change, VelocitySteeringFactorsPanel became timer-driven.

Tests performed

Not applicable.

Effects on system behavior

Not applicable.

Interface changes

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.

…lingSubscriber

Signed-off-by: Autumn60 <akiro.harada@tier4.jp>
@github-actions github-actions bot added the component:common Common packages from the autoware-common repository. (auto-assigned) label Jun 14, 2024
@Autumn60 Autumn60 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 14, 2024
@isamu-takagi
Copy link
Contributor

isamu-takagi commented Jun 14, 2024

I don't think this change will make much difference in performance. Since takeNewData takes messages from the queue in order, the same number of messages are processed, and there is more wasted processing because of polling.

@Autumn60
Copy link
Contributor Author

@isamu-takagi
Thanks for your opinion.
As you say, if the frequency at which messages are sent is lower than the loop rate (20 Hz), then all messages will be processed.

So I consider this change as a "performance stabilization" rather than a "performance improvement".
As for "CPU load independent of external topic frequency", this PR makes sense.

@isamu-takagi
Copy link
Contributor

Thank you. The PR purpose makes sense. However, since the main purpose of this debug tool is to check data, it is more important to process all data than performance, so I would like to continue using the callback method.

@Autumn60
Copy link
Contributor Author

@isamu-takagi

Thank you very much for your detailed explanation. 🙏
I will close the PR here and leave the callback as is.

@Autumn60 Autumn60 closed this Jun 18, 2024
@Autumn60 Autumn60 deleted the feat/tier4_state_rviz_plugin/sub_by_polling branch August 20, 2024 10:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:common Common packages from the autoware-common repository. (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