8 from roslib
import scriptutil
10 class Topics(roslib.message.Message):
11 __slots__ = (
'pubtopics',
'subtopics',
'nodes')
13 self.pubtopics, self.subtopics, self.
nodes = topics
18 raise RosTopicException(
"remote call failed: %s"%msg)
24 threading.Thread.__init__(self)
32 def topic_type(t, pub_topics):
33 matches = [t_type
for t_name, t_type
in pub_topics
if t_name == t]
38 master = scriptutil.get_master()
41 state =
succeed(master.getSystemState(
'/rostopic'))
44 pub_topics =
succeed(scriptutil.get_master().getPublishedTopics(
'/rostopic',
'/'))
45 pubtopics = [t
for t,_
in pubs]
48 subtopics = [t
for t,_
in subs]
61 topics = (tuple(pubtopics), tuple(subtopics), tuple(nodes))
70 if topics != lasttopics:
def setCallback(self, callback)
def __init__(self, topics)