Пример #1
0
class TopicMonitor:
    '''
    Monitors packets that are flowing on ROS topics.
    '''
    def __init__(self):
        # start the low level socket monitor
        self.smon = SocketMonitor('eth0')
        self.smon.start()
        self.master = rosgraph.master(rospy.get_name())

    def get_topic_usage(self):
        for topic_name, topic_type in self.master.getPublishedTopics(''):
Пример #2
0
 def __init__(self):
     # start the low level socket monitor
     self.smon = SocketMonitor('eth0')
     self.smon.start()
     self.master = rosgraph.master(rospy.get_name())