自主导航系列21-costmap
2020-9-10
1.costmap论文研究
Costmaps for Context-Sensitive Navigation 这篇论文阐述了layered maps相对于Monolithic的优点,解读了layered costmap的构造和他的生成过程
标准的layered costmap分为4层
- static map layer:静态层,是master costmap的底层,可以使用预先生成的静态地图,也可以创建空白地图
- obstacles layer:激光雷达生成
- voxels layer:使用3维的方式生成障碍层
- inflation layer:膨胀出non-lethal cost的区域
由这四层汇总成为master costmap,就这样
2.具体实现
准备阅读论文
For the base_local_planner, nothing should be modified, since the planning will not be affected in any way when exploding the maps in layers.
base_local_planner基本不受分层地图的影响。
在common的costmap中,
inflater:
10 robot_radius: 0.35 11
inflation_radius:0.35
obstacles:
observation_sources: pointcloud_sensor
pointcloud_sensor:
data_type: PointCloud2
topic: camera/depth/points
min_obstacle_height: 0.2
max_obstacle_height: 2.0
marking: true
clearing: true
z_voxels:8
z_resolution: 0.25
max_obstacle_height: 2.0
In this example, we create two layers: a inflater layer, that considers a circular robot with 35cm of radius, and, therefore, an inflation radius of 35cm so it doesn’t collide with anything; a obstacles layer, that takes the pointcloud data (if you are using a laser, please change that here) and passes this data to the costmap.
plugins:
-{name: obstacles, type: "costmap_2d::VoxelLayer"}
-{name: inflater, type: "costmap_2d::InflationLayer"}
在global和local里面也应该加上插件
LOCAL COSTMAP: If you’re not using a layered approach, your local_costma p in its whole will be displayed in this topic.
如果不使用分层的办法,那么本地的代价地图将会显示在这个topic中