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

Make rosnode info show topic types of unconnected subscribers #2366

Open
wants to merge 1 commit into
base: noetic-devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tools/rosnode/src/rosnode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def topic_type(t, pub_topics):
# go through the master system state first
try:
state = master.getSystemState()
pub_topics = master.getPublishedTopics('/')
topic_types = master.getTopicTypes()
except socket.error:
raise ROSNodeIOException("Unable to communicate with master!")
pubs = sorted([t for t, l in state[0] if node_name in l])
Expand All @@ -508,12 +508,12 @@ def topic_type(t, pub_topics):
buff = "Node [%s]"%node_name
if pubs:
buff += "\nPublications: \n"
buff += '\n'.join([" * %s [%s]"%(l, topic_type(l, pub_topics)) for l in pubs]) + '\n'
buff += '\n'.join([" * %s [%s]"%(l, topic_type(l, topic_types)) for l in pubs]) + '\n'
else:
buff += "\nPublications: None\n"
if subs:
buff += "\nSubscriptions: \n"
buff += '\n'.join([" * %s [%s]"%(l, topic_type(l, pub_topics)) for l in subs]) + '\n'
buff += '\n'.join([" * %s [%s]"%(l, topic_type(l, topic_types)) for l in subs]) + '\n'
else:
buff += "\nSubscriptions: None\n"
if srvs:
Expand Down