< >
Home » ROS与navigation教程 » ROS与navigation教程-global_planner

ROS与navigation教程-global_planner

ROS与navigation教程-global_planner

说明:

  • 介绍global_planner不同参数化实例和相关的API

概述

  • global_planner是一个路径规划器节点。

  • 这个包为导航实现了一种快速,内插值的全局路径规划器, 继承了nav_core包中nav_core::BaseGlobalPlanner接口,该实现相比navfn使用更加灵活。

代码库

不同参数化实例

( 1 ) 标准行为示例

  • 所有参数使用默认值

请输入图片描述

( 2 ) 栅格路径示例

  • use_grid_path=True

请输入图片描述

  • 路径遵循栅格边界。

( 3 ) Simple Potential Calculation

  • use_quadratic=False

请输入图片描述

  • Slightly different calculation for the potential. Note that the
    original potential calculation from navfn is a quadratic
    approximation. Of what, the maintainer of this package has no idea.

( 4 ) A* Path

  • use_dijkstra=False

请输入图片描述

  • Note that a lot less of the potential has been calculated (indicated by the colored areas). This is indeed faster than using Dijkstra's, but has the effect of not necessarily producing the same paths. Another thing to note is that in this implementation of A, the potentials are computed using 4-connected grid squares, while the path found by tracing the potential gradient from the goal back to the start uses the same grid in an 8-connected fashion. Thus, the actual path found may not be fully optimal in an 8-connected sense. (Also, no visited-state set is tracked while computing potentials, as in a more typical A implementation, because such is unnecessary for 4-connected grids). To see the differences between the behavior of Dijkstra's and the behavior of A*, consider the following example.

( 4.1 ) Dijkstra's

请输入图片描述

( 4.2 ) A*

请输入图片描述

( 5 ) Old Navfn Behavior

  • old_navfn_behavior=True For reproducing paths just like NavFn did.

请输入图片描述

  • 注意

    • 地图上路径的起始位置与实际的起始位置不匹配

    • 路径的最末端沿着栅格线移动。

    • 所有坐标稍微偏移了一半的网格单元格

ROS API

( 1 ) Published Topics

~<name>/plan ([nav_msgs/Path][11]) 
  • The last plan computed, published every time the planner computes a new path, and used primarily for visualization purposes.

( 2 )Parameters

~<name>/allow_unknown (bool, default: true) 
  • 指定是否允许路径规划器在未知空间创建路径规划。

  • 注意:如果您使用带有体素或障碍层的分层costmap_2d costmap,还必须将该层的track_unknown_space参数设置为true,否则会将所有未知空间转换为可用空间。

  • Specifies whether or not to allow the planner to create plans that traverse unknown space. NOTE: if you are using a layered costmap_2d costmap with a voxel or obstacle layer, you must also set the track_unknown_space param for that layer to be true, or it will convert all your unknown space to free space (which planner will then happily go right through).

~<name>/default_tolerance (double, default: 0.0) 
  • 路径规划器目标点的公差范围。

  • 在默认公差范围内,路径规划器将尝试创建一个尽可能接近到达指定的目标的路径规划。

~<name>/visualize_potential (bool, default: false) 
  • 指定是否通过可视化PointCloud2计算的潜在区域。
~<name>/use_dijkstra (bool, default: true) 
  • 如果为ture,则使用dijkstra算法。 否则使用A *算法。
~<name>/use_quadratic (bool, default: true) 
  • If true, use the quadratic approximation of the potential. Otherwise, use a simpler calculation.
~<name>/use_grid_path (bool, default: false) 
  • 如果为true,沿着栅格边界创建路径。 否则,使用梯度下降的方法。
~<name>/old_navfn_behavior (bool, default: false) 
  • 如果你想要global_planner准确反映navfn的行为,此项设置为true。

参考资料

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: ros与navigation教程