大部分内容参考自:

ros_by_example_hydro_volume_1.pdf

主要是讲如何让先锋机器人在空白地图上运动

上面图是navigation框架图,可以看到move_base处在核心地位

move_base这个包由许多组件组成

详细看:

http://wiki.ros.org/move_base?distro=kinetic

component apis部分

/map提供全局地图

/tf提供当前全局位姿

“odom”topic提供机器人速度与角速度,这个在DWA(动态窗口法)中会用到,

因为动态窗口法是使用当前机器人速度与角速度推断一段时间后轨迹看看会不会与障碍物相碰

sensor topics 还没有弄明白点云是怎么转换成cost_map

如何使用move_base:

move_base这个包启动后会同时启用

global_planner:参数配置链接:http://wiki.ros.org/global_planner?distro=kinetic

local_planner:参数配置链接:http://wiki.ros.org/base_local_planner?distro=kinetic

global_costmap:参数配置链接:http://wiki.ros.org/costmap_2d

local_costmap:参数配置链接:http://wiki.ros.org/costmap_2d

参数文件配置范例参考:ros by example volume1 中 8.1.2小节

其中planner可以通过设置move_base参数

http://wiki.ros.org/move_base?distro=kinetic

~base_global_planner (string, default: "navfn/NavfnROS" For 1.1+ series)

  • The name of the plugin for the global planner to use with move_base, see pluginlib documentation for more details on plugins. This plugin must adhere to the nav_core::BaseGlobalPlanner interface specified in the nav_core package. (1.0 series default: "NavfnROS")

~base_local_planner (string, default: "base_local_planner/TrajectoryPlannerROS" For 1.1+ series)

  • The name of the plugin for the local planner to use with move_base see pluginlib documentation for more details on plugins. This plugin must adhere to the nav_core::BaseLocalPlanner interface specified in the nav_core package. (1.0 series default: "TrajectoryPlannerROS")

比如要使用别的local planner

http://wiki.ros.org/nav_core#BaseLocalPlanner

上面链接有说明哪些现成local planner可以用

比如用eband_local_planner

http://wiki.ros.org/eband_local_planner

  <node pkg="move_base" type="move_base" name="move_base">
<param name="base_local_planner" value="eband_local_planner/EBandPlannerROS"/>
...
</node>  

就可以在move_base使用使用eband_local_planner了

move_base默认使用base_local_planner

这个可以在

~base_local_planner (string, default: "base_local_planner/TrajectoryPlannerROS" For 1.1+ series)

中看出来

指定了planner之后就可以到对应页面参考参数设置了

之后是一个例子,实现局部路径规划(避障)

因为不需要全局cost_map,所以将/odom和/map固定在一块,用/odom tf来进行定位

两个launch file

这个launch file是启动先锋机器人驱动

<launch>
<!--launch driver-->
<node pkg="rosaria" type="RosAria" name="RosAria">
<param name="port" value="/dev/ttyUSB0" />
</node> <!-- Launch move_base and load all navigation parameters -->
<include file="$(find pioneer_zed)/launch/pioneer_move_base.launch" /> <!-- Run the map server with a blank map -->
<node name="map_server" pkg="map_server" type="map_server" args="$(find pioneer_zed)/maps/blank_map.yaml" /> <!-- Run a static transform between /odom and /map -->
<node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" /> </launch>  

这个launch file是move_base配置

<launch>

  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
<remap from="/cmd_vel" to="/RosAria/cmd_vel"/>
<rosparam file="$(find pioneer_zed)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find pioneer_zed)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find pioneer_zed)/config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find pioneer_zed)/config/global_costmap_params.yaml" command="load" />
<rosparam file="$(find pioneer_zed)/config/base_local_planner_params.yaml" command="load" />
</node> </launch>

  

最新文章

  1. php中include()和require()的区别
  2. linux内核学习之七 可执行程序的装载和运行
  3. HDU 5878 I Count Two Three (打表+二分查找) -2016 ICPC 青岛赛区网络赛
  4. Linux 本人常用到的基本命令
  5. 菜鸟-手把手教你把Acegi应用到实际项目中(5)
  6. 504 Gateway Time-out 和 502 Bad Gateway相关处理
  7. BestCoder Round #81 (div.2)1001
  8. js数组的操作&lt;转&gt;
  9. 暂时和永久改动oracle sysdate的默认输出格式
  10. Struts2的通配符配置方式
  11. 工具(1): 极简Word排版示例(Example by Word2013)
  12. crm 动态一级二级菜单
  13. HAProxy详细中文用法详解
  14. ssh 报错Host key verification failed 或Ubuntu connect to serve 失败
  15. 最多的划分来使数组有序 Max Chunks To Make Sorted
  16. js常用函数的封装
  17. 20145127 《Java程序设计》第一周学习总结
  18. CodeChef SADPAIRS:Chef and Sad Pairs
  19. Windows环境下使用Nginx搭建负载均衡
  20. PHP-流的概念与详细用法

热门文章

  1. mongo创建数据库和用户
  2. Eclipse 窗口说明---Eclipse教程第03课
  3. 平时收集的一些有关UED的团队和个人博客
  4. 剑指Offer - 九度1386 - 旋转数组的最小数字
  5. Hyper-V 安装Windows 2008,08 R2,12 R2 无网卡驱动的解决办法
  6. JAVA中的类
  7. python之while/for循环
  8. 孤荷凌寒自学python第四十二天python线程控制之Condition对象
  9. Android记事本11
  10. HttpWebRequest调用WebService后台需要Session信息问题的解决办法