def __init__(self):
rospy.init_node('nav_asr', anonymous = True)
rospy.Subscriber("/recognizer/output", String, self.SpeechUpdateGoal)
rospy.Subscriber("/WPsOK", String, self.GetWayPoints)
self.waypoint_list = dict()
self.marker_list = list()
self.makerArray = MarkerArray()
self.makerArray_pub = rospy.Publisher("Waypoint_Array",MarkerArray,queue_size=5)
rospy.on_shutdown(self.shutdown) # @@@@
# How long in seconds should the robot pause at each location?
self.rest_time = rospy.get_param("~rest_time", 2)
# Are we running in the fake simulator?
self.fake_test = rospy.get_param("~fake_test", True)
# Publisher to manually control the robot (e.g. to stop it, queue_size=5)
self.cmd_vel_pub = rospy.Publisher('cmd_vel', Twist, queue_size=5)
# Subscribe to the move_base action server
self.move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction)
rospy.loginfo("Waiting for move_base action server...")
# Wait 60 seconds for the action server to become available
self.move_base.wait_for_server(rospy.Duration(60))
rospy.loginfo("Connected to move base server")
# Create the waypoints list from txt
评论列表
文章目录