Created
July 7, 2016 12:07
-
-
Save mintar/50c7fed43d4bea5637fa559080cd129e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# not tested: | |
import rospy | |
import actionlib | |
from move_base_msgs.msg import MoveBaseAction, MoveBaseGoal | |
from geometry_msgs.msg import PointStamped, PoseStamped | |
def call_move_base(self, pose): | |
move_base_goal = MoveBaseGoal() | |
# get target_pose | |
move_base_goal.target_pose.pose = pose | |
move_base_goal.target_pose.header.frame_id = "/map" | |
move_base_goal.target_pose.header.stamp = rospy.Time.now() | |
client = actionlib.SimpleActionClient('move_base', MoveBaseAction) | |
client.wait_for_server() | |
client.send_goal(move_base_goal) | |
client.wait_for_result() | |
return client.get_state() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment