导航相关的命令

查看导航状态

rostopic echo move_base/status

发导航命令到某点

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: 'map'
pose:
position:
x: 60.0
y: -6.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0"

停止导航

一句话:rostopic pub /move_base/cancel actionlib_msgs/GoalID -- {},即向话题/move_base/cancel发空消息

1
2
3
4
ros::Publisher cancle_pub_ = nh_.advertise("move_base/cancel",1);

actionlib_msgs::GoalID first_goal;
cancle_pub_.publish(first_goal);