def __init__(self):
# rospy.init_node('nav_test', anonymous=False)
#what to do if shut down (e.g. ctrl + C or failure)
rospy.on_shutdown(self._shutdown)
#tell the action client that we want to spin a thread by default
self.move_base = actionlib.SimpleActionClient("move_base", MoveBaseAction)
rospy.loginfo("waiting for the action server to come up...")
#allow up to 5 seconds for the action server to come up
self.move_base.wait_for_server(rospy.Duration(5))
#we'll send a goal to the robot to tell it to move to a pose that's near the docking station
self.goal = MoveBaseGoal()
self.goal.target_pose.header.frame_id = 'odom'
self.goal.target_pose.header.stamp = rospy.Time.now()
评论列表
文章目录