ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After comparing the result of rosparam get /move_base/local_costmap for the file costmap_local.yaml with specified plugins and without (pre-Hydro parameters) I noticed two issues:

1.The laser_scanner and observation_sources parameters were not correctly contained inside the obstacle_layer of the local costmap. To correct this I moved these two parameters from a separate .yaml file in which I specified them (loaded into the local_costmap ns inside my .launch file) and to the costmap_local.yaml specified in the following way:

Specified in costmap_local.yaml

  obstacle_layer:
    observation_sources: laser_scanner
    laser_scanner: {sensor_frame: scan_combined, data_type: LaserScan, topic: /laser_unified/scan, marking: true, clearing: true, expected_update_rate: 9.0}

Notice that this must be specified inside costmap_local.yaml and not costmap_common.yaml as I set static_map: true in the costmap_global.yaml. If placed inside costmap_common.yaml a warning similar to this will occur:

[ WARN] [1587471627.753143928, 471.157000000]: The origin for the sensor at (0.02, 0.02, -0.00) is out of map bounds. So, the costmap cannot raytrace for it.

2.Default or pre-Hydro layers call the obstacle layer in its singular form (without an s). Therefore, I changed the name of my obstacle layer plugin to be in the following form:

Specified in costmap_local.yaml

plugins:
    - {name: obstacle_layer,          type: "costmap_2d::ObstacleLayer}