< >
Home » ROS与navigation教程 » ROS与navigation教程-costmap_2d-inflation

ROS与navigation教程-costmap_2d-inflation

ROS与navigation教程-costmap_2d-inflation

说明:

  • 介绍costmap_2d-inflation的概念和相关知识。

Inflation Costmap Plugin

( 1 ) Inflation

请输入图片描述

  • 膨胀代价值随着机器人离障碍物距离增加而减少。

  • 为代价地图的代价值定义5个与机器人有关的标记:

    • 致命的("Lethal" cost):说明该单元格中存在一个实际的障碍。若机器人的中心在该单元格中,机器人必然会跟障碍物相撞。

    • 内切("Inscribed" cost):说明该单元格离障碍物的距离小于机器人内切圆半径。若机器人的中心位于等于或高于"Inscribed" cost的单元格,机器人必然会跟障碍物相撞。

    • 可能外切("Possibly circumscribed" cost ):说明一个单元格离障碍物的距离小于机器人外切圆半径,但是大于内切圆半径。若机器人的中心位于等于或高于"Possibly circumscribed" cost 的单元格,机器不一定会跟障碍物相撞,其取决于机器人的方位。

    • 自由空间("Freespace" ):没有障碍的空间。

    • 未知("Unknown") : 未知空间。

    • All other costs are assigned a value between "Freespace" and "Possibly circumscribed" depending on their distance from a "Lethal" cell and the decay function provided by the user.

  • The rationale behind these definitions is that we leave it up to planner implementations to care or not about the exact footprint, yet give them enough information that they can incur the cost of tracing out the footprint only in situations where the orientation actually matters.

( 2 ) ROS API

( 2.1 ) Parameters

~<name>/inflation_radius (double, default: 0.55) 
  • The radius in meters to which the map inflates obstacle cost values.

  • 障碍物在地图中向外扩展的膨胀区的半径,单位为 meters 。

~<name>/cost_scaling_factor (double, default: 10.0) 
  • 膨胀过程中应用到代价值的比例因子。

  • 成本函数的计算方法如下:exp(-1.0 * cost_scaling_factor * (distance_from_obstacle - inscribed_radius)) * (costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1),公式中costmap_2d::INSCRIBED_INFLATED_OBSTACLE目前指定为254。

  • 注意:由于在公式中将cost_scaling_factor乘以负数,所以增大比例因子会降低代价值。

  • A scaling factor to apply to cost values during inflation. The cost function is computed as follows for all cells in the costmap further than the inscribed radius distance and closer than the inflation radius distance away from an actual obstacle: exp(-1.0 * cost_scaling_factor * (distance_from_obstacle - inscribed_radius)) * (costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1), where costmap_2d::INSCRIBED_INFLATED_OBSTACLE is currently 254. NOTE: since the cost_scaling_factor is multiplied by a negative in the formula, increasing the factor will decrease the resulting cost values.

参考资料

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

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


标签: ros与navigation教程