38 PKG =
'rospy_tutorials' 39 NAME =
'peer_subscribe_notify_test' 47 import roslib.scriptutil
as scriptutil
53 super(TestListenerConnectionHeader, self).
__init__(*args)
58 if 'callerid' in data._connection_header:
59 who = data._connection_header[
'callerid']
63 print(
"I just heard %s from %s" % (chatter, who))
66 rospy.Subscriber(
"chatter", String, self.
callback)
67 rospy.init_node(NAME, anonymous=
True)
68 timeout_t = time.time() + 10.0*1000
69 while not rospy.is_shutdown()
and not self.
success and time.time() < timeout_t:
73 if __name__ ==
'__main__':
74 rostest.rosrun(PKG, NAME, TestListenerConnectionHeader, sys.argv)