ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
An alternative way of doing this without having to look at the graph is to use
from rosgraph.masterapi import Master
master = Master("/bag_helper")
all_topics = sorted([topic_tuple[0] for topic_tuple in master.getTopicTypes()])
published_topics = [topic_tuple[0] for topic_tuple in master.getPublishedTopics("/")]
subscribed_topics = list(set(all_topics) - set(published_topics))
2 | No.2 Revision |
An alternative way of doing this without having to look at the graph is to use
from rosgraph.masterapi import Master
master = Master("/bag_helper")
all_topics = sorted([topic_tuple[0] [topic_tuple[0] for topic_tuple in master.getTopicTypes()])
master.getTopicTypes()]
published_topics = [topic_tuple[0] for topic_tuple in master.getPublishedTopics("/")]
subscribed_topics = list(set(all_topics) - set(published_topics))
3 | No.3 Revision |
An alternative way of doing this without having to look at the graph is to use
from rosgraph.masterapi import Master
master = Master("/bag_helper")
Master("/my_node")
all_topics = [topic_tuple[0] for topic_tuple in master.getTopicTypes()]
published_topics = [topic_tuple[0] for topic_tuple in master.getPublishedTopics("/")]
subscribed_topics = list(set(all_topics) - set(published_topics))
4 | No.4 Revision |
An alternative way of doing this without having to look at the graph is to use
#!/usr/bin/env python
from rosgraph.masterapi import Master
master = Master("/my_node")
all_topics = [topic_tuple[0] for topic_tuple in master.getTopicTypes()]
published_topics = [topic_tuple[0] for topic_tuple in master.getPublishedTopics("/")]
subscribed_topics = list(set(all_topics) - set(published_topics))
5 | No.5 Revision |
An alternative way of doing this without having to look at the graph is to use
#!/usr/bin/env python
from rosgraph.masterapi import Master
master = Master("/my_node")
all_topics = [topic_tuple[0] for topic_tuple in master.getTopicTypes()]
published_topics = [topic_tuple[0] for topic_tuple in master.getPublishedTopics("/")]
subscribed_topics = list(set(all_topics) - set(published_topics))