Ask Your Question

move_base obstacle clearing in open field problem

asked 2021-11-13 14:02:30 -0600

JeremieBourque gravatar image

updated 2021-11-15 08:23:37 -0600


A project I am working on involves the use of a mobile robot in an open field using move_base to navigate autonomously and avoiding obstacles.

The obstacles in the costmaps only get cleared with raytracing when an obstacle further away is detected. This is a problem for me since most of the time there is no other obstacle that the sensor can see. For example, if someone were to walk in front of the robot, he would leave a trail in the costmap that never gets cleared because there is nothing behind it.

Does anyone know of a solution to this problem?



Here are my configuration files for the costmaps

Common parameters: obstacle_range: 3.0 raytrace_range: 3.5

robot_base_frame: base_footprint
update_frequency: 4.0
publish_frequency: 4.0
transform_tolerance: 0.5

footprint: [[-0.17, -0.18], [-0.17, 0.22], [0.17, 0.22], [0.17, -0.18]]
footprint_padding: 0.0

resolution: 0.05

   map_topic: /map

    observation_sources: laser
    laser: {data_type: LaserScan, topic: /scan, clearing: true, marking: true, inf_is_valid: false, track_unknown_space: true} 

    cost_scaling_factor: 2
    inflation_radius: 1

Global parameters:

global_frame: map

rolling_window: true

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

Local parameters:

global_frame: odom

rolling_window: true
width: 3
height: 3

  - {name: obstacle_layer,            type: "costmap_2d::ObstacleLayer"}
  - {name: inflation_layer,           type: "costmap_2d::InflationLayer"}
edit retag flag offensive close merge delete



Could you please post the config .yaml files. Is clearing even activated (In obstacle layer marking: true, clearing: true)? Otherwise maybe this

Dragonslayer gravatar image Dragonslayer  ( 2021-11-13 15:07:25 -0600 )edit

Hi, I have updated my question with my parameters. I will also check the link in your comment, thank you.

JeremieBourque gravatar image JeremieBourque  ( 2021-11-15 08:25:09 -0600 )edit

In your obstacle_layer "inf_is_valid: false" The docs say "Are infinite returns from laser scanners valid measurements to raycast." Would be worth a try to set it to true.

Dragonslayer gravatar image Dragonslayer  ( 2021-11-15 09:42:43 -0600 )edit

Yes that worked for me, thank you! Would you post it as an answer so I can mark it as the solution?

JeremieBourque gravatar image JeremieBourque  ( 2021-11-15 10:05:13 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-11-15 12:05:05 -0600

Dragonslayer gravatar image

In your obstacle_layer "inf_is_valid: false" The docs say "Are infinite returns from laser scanners valid measurements to raycast." Set to "true".

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


Asked: 2021-11-13 14:02:30 -0600

Seen: 30 times

Last updated: Nov 15 '21