手动发布目标点
命令
rostopic pub /move_base_simple/goal
Tab键补全数据格式
rostopic pub /move_base_simple/goal gemetry_msgs/PoseStamped
Tab键补全数据内容
rostopic pub /move_base_simple/goal gemetry_msgs/PoseStamped "header: seq: 0 stamp:: 0 secs: 00 nsecs: 0' ' frame_id: ' ' pose:ition: position: x: 0.0 y: 0.0
z: 0.0ion:
orientation:
x: 0.0
y: 0.0"
z: 0.0
w: 0.0"
需要输入数据内容
frame_id: 'map'
#以map为原点
position
他的x,y,z代表移动距离,单位m。z默认不移动为0
orientation:四元数
w =cos(theta/2)
x=ax *sin(theta/2)
y = ay * sin(theta/2)
Z=az *sin(theta/2)
其中(ax,ay,az)表示轴的矢量,theta表示绕此轴的旋转角度,小车X,Y不用设置,默认为0。az默认为1,设置theta即可(逆时针方向为正)。
navigation.launch
代码
<launch> <!-- 开启机器人底层相关节点 --> <include file="$(find turn_on_wheeltec_robot)/launch/turn_on_wheeltec_robot.launch" /> <!-- turn on lidar开启思岚雷达 --> <include file="$(find rplidar_ros)/launch/rplidar.launch" /> <!-- 设置需要用于导航的地图 .yaml可以更换地图 --> <arg name="map_file" default="$(find turn_on_wheeltec_robot)/map/keting.yaml"/> <node name="map_server_for_test" pkg="map_server" type="map_server" args="$(arg map_file)"> </node> <!-- 开启用于导航的自适应蒙特卡洛定位amcl_omni 运动方式是omni--> <include file="$(find turn_on_wheeltec_robot)/launch/include/amcl_omni.launch" /> <!-- 开启teb_local_planner导航算法-一般用于全向移动阿克曼等车--> <!-- <include file="$(find turn_on_wheeltec_robot)/launch/include/teb_local_planner.launch" />--> <!-- 开启dwa_local_planner导航算法-一般用于差速车--> <include file="$(find turn_on_wheeltec_robot)/launch/include/dwa_local_planner.launch" /> <!-- MarkerArray功能节点> --> <node name='send_mark' pkg="turn_on_wheeltec_robot" type="send_mark.py"> </node> </launch>