Ask Your Question
0

Local_costmap not showing every obstacle

asked 2019-06-25 03:22:33 -0500

joekeo gravatar image

updated 2019-06-26 07:56:02 -0500

David Lu gravatar image

Hello,

Sorry if this is a double post, i can seem to find anyone with the same issue. I have been working with move_base for a while now using different platforms. But I have never experienced this issue, maybe some of you did.

The local costmap seems to only be showing some of the obstacles but not all of them, particularly dynamic ones. The picture below shows an exmaple, where the local cost map picks up objects by the side of the robot, but not the table that is just infront of him.

Selection_034

Similar things happen with dynamic ones (people) the costmap shows them at random points around the robot, but not all the time.

The robot is setup with a Hokuyo lidar. here are the config files: common_costmap.yaml

global_frame: map
robot_base_frame: base_link

footprint:  [[0.42, 0.26], [-0.42, 0.26], [-0.42, -0.26], [0.42, -0.26]]
footprint_padding: 0.03

inflater_layer:
  inflation_radius: 0.05
  cost_scaling_factor: 0.5

plugins:
- {name: obstacles_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflater_layer, type: "costmap_2d::InflationLayer"}

global_costmap.yaml:

global_costmap:
  update_frequency: 5.0
  static_map: true
  rolling_window: false
  resolution: 0.05
  static_layer:
    map_topic: /map
    subscribe_to_updates: true
    lethal_cost_threshold: 60
  inflater_layer:
    inflation_radius: 0.25
    cost_scaling_factor: 0.5

  plugins:
  - {name: static_layer, type: "costmap_2d::StaticLayer"}
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

local_costmap.yaml:

local_costmap:
  update_frequency: 5.0
  publish_frequency: 5.0
  static_map: false
  rolling_window: true
  width: 8.0
  height: 8.0
  resolution: 0.05


  obstacles_layer:
    observation_sources: laser_scan_sensor
    laser_scan_sensor: {sensor_frame: horizontal_laser_link, data_type: LaserScan, topic: scan, clearing: true, marking: true}
    max_obstacle_height: 3
    obstacle_range: 10
    raytrace_range: 11

If anyone have any Idea why this is happening, you will help me sleep at night.

Best, Pepe

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-07-03 08:33:43 -0500

joekeo gravatar image

Managed to solve this. The solution was similar (if not the same) as what David Lu proposed. Bellow I show the final cost map files

Common costmap

global_frame: map
robot_base_frame: base_link

footprint:  [[0.42, 0.26], [-0.42, 0.26], [-0.42, -0.26], [0.42, -0.26]]
footprint_padding: 0.1

global costmap

global_costmap:
  update_frequency: 5.0
  static_map: true
  rolling_window: false
  width: 100.0
  height: 100.0
  resolution: 0.05
  static_layer:
    map_topic: /map
    subscribe_to_updates: true
    lethal_cost_threshold: 60
  inflater_layer:
    inflation_radius: 0.5
    cost_scaling_factor: 0.5

  plugins:
  - {name: static_layer, type: "costmap_2d::StaticLayer"}
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}

local costmap:

local_costmap:
  update_frequency: 10.0
  publish_frequency: 10.0
  static_map: false
  rolling_window: true
  width: 5.0
  height: 5.0
  resolution: 0.05

  inflater_layer:
    inflation_radius: 0.25
    cost_scaling_factor: 0.5


  obstacle_layer:
    observation_sources: laser_scan_sensor
    laser_scan_sensor: {sensor_frame: horizontal_laser_link, data_type: LaserScan, topic: scan, clearing: true, marking: true}
    max_obstacle_height: 3
    obstacle_range: 10
    raytrace_range: 11

  plugins:
  - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
  - {name: inflater_layer, type: "costmap_2d::InflationLayer"}
edit flag offensive delete link more
0

answered 2019-06-26 07:55:39 -0500

David Lu gravatar image

I would start by moving the plugins variable from common_costmap.yaml to local_costmap.yaml to avoid it possibly getting overwritten in the global costmap. I'm also curious if the orientation is consistent, as in, if you rotate your robot, is it always the obstacles in front of your robot?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-06-25 03:22:33 -0500

Seen: 26 times

Last updated: Jul 03