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 removal of topics while they are being monitored. #39

Merged
merged 1 commit into from Apr 28, 2022

Conversation

clalancette
Copy link

Prior to this change, if a topic was being monitored by rqt_topic
and then went away, it would stay in the window forever. The main
reason for this is that the subscription that rqt_topic itself
is using counts as one of the topics in the graph, and so it wasn't
"empty" to be deleted. To fix this, we notice that for every
topic we are currently monitoring, there should be at least one
additional publisher or subscription in the graph besides rqt_topic.
If there is, then we continue monitoring. If there isn't, we
delete the topic.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

Prior to this change, if a topic was being monitored by rqt_topic
and then went away, it would stay in the window forever.  The main
reason for this is that the subscription that rqt_topic itself
is using counts as one of the topics in the graph, and so it wasn't
"empty" to be deleted.  To fix this, we notice that for every
topic we are currently monitoring, there should be at least one
additional publisher or subscription in the graph besides rqt_topic.
If there is, then we continue monitoring.  If there isn't, we
delete the topic.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Copy link
Collaborator

@audrow audrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good with green CI.

@clalancette
Copy link
Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status

@clalancette clalancette merged commit cb36cde into foxy-devel Apr 28, 2022
@clalancette clalancette deleted the clalancette/fix-topic-monitoring branch April 28, 2022 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants