ROS导航包学习 - 全局路径规划
ROS导航包中全局路径规划功能在navigator/global_planner/planner_core.h
planner_core.h文件中定义了全局规划器的功能接口
class GlobalPlanner : public nav_core::BaseGlobalPlanner
其中nav_core基类定义在/navigator/nav_core_base_global_planner.h中
主要定义了2个纯虚函数接口:
1.makePlan 路径规划接口函数
2.initialize 初始化规划器接口函数
在GlobalPlanner中的主要接口函数:
1 makePlan 重载了路径规划接口函数
2 initialize 重载了初始化规划器接口函数
3 computePotential 新定义了计算规划地图势场的接口函数 (已经不使用了)
4 getPlanFromPotential 新定义了得到规划路径的接口函数(提供给makePlan使用)
在GlobalPlanner中的主要成员变量
1 Expander* planner_ 成员变量图搜索算法指针,如: (a星、dijkstra),该成员变量为图搜索算法的基类,定义在navigator/global_planner/expender.h中,提供了一个纯虚汗数接口定义
calculatePotentials 图搜索算法计算势场接口,这个接口会被(a星、dijkstra)图搜索算法集成并提供给GlobalPlanner的makePlan使用
GlobalPlanner中原定义的computePotential接口不使用了,应该也是为了更方便的扩展不同的图搜索算法,而将计算规划地图势场的功能交由独立的图搜索算法实现。
------臨時修改,之前整理
navigation
包含了
amcl:机器人定位算法
amcl is a probabilistic localization system for a robot moving in 2D. It implements the adaptive (or KLD-sampling) Monte Carlo localization approach (as described by Dieter Fox), which uses a particle filter to track the pose of a robot against a known map.
odom:机器人里程计定位
A ROS node that simply forwards odometry information.
map_server:静态地图数据
map_server provides the map_server ROS Node, which offers map data as a ROS Service. It also provides the map_saver command-line utility, which allows dynamically generated maps to be saved to file.
move_base:导航框架 (如何使用地圖、裏程計等傳感器數據做導航規劃)
The move_base package provides an implementation of an action (see the actionlib package) that, given a goal in the world, will attempt to reach it with a mobile base. The move_base node links together a global and local planner to accomplish its global navigation task. It supports any global planner adhering to the nav_core::BaseGlobalPlanner interface specified in the nav_core package and any local planner adhering to the nav_core::BaseLocalPlanner interface specified in the nav_core package. The move_base node also maintains two costmaps, one for the global planner, and one for a local planner (see the costmap_2d package) that are used to accomplish navigation tasks.
包含了
global and local planner,nav_core nav_core::BaseLocalPlanner基類指針
global_planner
dwa_local_planner
carrot_planner
base_local_planner
dwa_local_planner
costmap_2d 地圖
voxel_grid 體術柵格,盡管可能使用不到
導航框架中除了地圖和規劃算法外還包含了導航異常時的一些恢復動作,盡管他們可能不是那麼的有效
rotate_recovery
move_slow_and_clear
navfn
navfn provides a fast interpolated navigation function that can be used to create plans for a mobile base. The planner assumes a circular robot and operates on a costmap to find a minimum cost plan from a start point to an end point in a grid. The navigation function is computed with Dijkstra’s algorithm, but support for an A* heuristic may also be added in the near future. navfn also provides a ROS wrapper for the navfn planner that adheres to the nav_core::BaseGlobalPlanner interface specified in nav_core.
看上去像是舊版本使用的規劃接口,但是現在被合並到move_base的BaseGlobalPlanner 接口中了