Ask Your Question
0

Local costmap not showing obstacles

asked 2020-01-23 10:30:39 -0500

SimonDahrs gravatar image

Hello,

I'm using move_base package to navigate my robot.
The navigation seems to work, however no obstacles are detected.
The local costmap only shows the static layer, but not the obstacle_layer and inflater_layer.
The image below shows the RVIZ screenshot with the local costmap enabled. At the time the screenshot was taken, there were actually multiple large obstacles in the room. The pink colored drawings are the local costmap, but when I disable the static layer, the whole local costmap is empty.

RVIZ screenshot

Here are my costmap param files:

costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.165, -0.170], [0.165, -0.170], [0.165, 0.170], [-0.165, 0.170]]
publish_voxel_map: true
meter_scoring: true

global_costmap_params.yaml:

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true

  inflater_layer:
    inflation_radius: 0.2
    cost_scaling_factor: 0.5

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

local_costmap_params.yaml:

local_costmap:
  global_frame: odom
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  width: 3.0
  height: 3.0
  rolling_window: true

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

  inflater_layer:
    inflation_radius: 0.35
    cost_scaling_factor: 0.5


  obstacle_layer:
    observation_sources: laser_scan_sensor
    laser_scan_sensor: {sensor_frame: laser_frame, 
data_type: LaserScan, 
topic: scan, marking: true, 
clearing: true, 
max_obstacle_height: 3, 
min_obstacle_height: -3, 
inf_is_valid: true, 
obstacle_range: 2.5, 
combination_method: 0,
raytrace_range: 3}

Does anyone know why I can't see any live obstacles?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-01-27 21:21:00 -0500

billy gravatar image

I tested your files by starting my system with current working YAML files and converting to your setup until it broke. All of this bit worked fine on my system.

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

  inflater_layer:
    inflation_radius: 0.35
    cost_scaling_factor: 0.5


  obstacle_layer:
    observation_sources: laser_scan_sensor
    laser_scan_sensor: {sensor_frame: laser_frame, 
data_type: LaserScan, 
topic: scan, marking: true, 
clearing: true, 
max_obstacle_height: 3, 
min_obstacle_height: -3, 
inf_is_valid: true, 
obstacle_range: 2.5, 
combination_method: 0,
raytrace_range: 3}

But it needs to be in under common cost maps, not local. When I moved it all to Local the way you have it, my system broke.

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

1 follower

Stats

Asked: 2020-01-23 10:30:39 -0500

Seen: 702 times

Last updated: Jan 27 '20