8 import move_base_msgs.msg
as move_base_msgs
9 import visualization_msgs.msg
as viz_msgs
13 def __init__(self, filename, random_visits=False, repeat=False):
16 action_name =
'move_base' 18 rospy.loginfo(
'Wait for %s server' % action_name)
19 self._ac_move_base.wait_for_server
26 self.
_pub_viz_marker = rospy.Publisher(
'viz_waypoints', viz_msgs.MarkerArray, queue_size=1, latch=
True)
33 rospy.loginfo(
"Finishing Tour")
36 goal = utils.create_move_base_goal(p)
37 rospy.loginfo(
"Move to %s" % p[
'name'])
38 self._ac_move_base.send_goal(goal)
39 self._ac_move_base.wait_for_result()
40 result = self._ac_move_base.get_result()
41 rospy.loginfo(
"Result : %s" % result)
52 next_destination =
None 55 return next_destination
61 while not rospy.is_shutdown()
and not finished:
65 if __name__ ==
'__main__':
66 rospy.init_node(
'tour')
68 filename = rospy.get_param(
'~filename')
69 random_visits = rospy.get_param(
'~random',
False)
70 repeat = rospy.get_param(
'~repeat',
False)
73 rospy.loginfo(
'Initialized')
75 rospy.loginfo(
'Bye Bye')
def __init__(self, filename, random_visits=False, repeat=False)
def _get_next_destination(self)