35 from __future__
import print_function
37 PKG =
'static_map_server'
46 from nav_msgs.srv
import GetMap
51 super(TestConsumer, self).
__init__(*args)
55 print(rospy.get_caller_id(),
"I heard %s" % data.data)
56 self.
success = data.data
and data.data.startswith(
'hello world')
57 rospy.signal_shutdown(
'test done')
60 rospy.wait_for_service(
'static_map')
61 mapsrv = rospy.ServiceProxy(
'static_map', GetMap)
65 while not rospy.is_shutdown()
and not self.
success:
68 rospy.signal_shutdown(
'test done')
70 if __name__ ==
'__main__':
71 rostest.rosrun(PKG, NAME, TestConsumer, sys.argv)