clearing obstacles from local costmap faster

asked 2014-12-31 14:57:07 -0500

mohammad gravatar image

hi everyone

when we are using navigation stack, how we could clear faster the obstacles from local costmap?? I mean some dynamic obstacles which pass across the robot and it recognizes them intime and show them in costmap, but the robot is slow to clear them after they pass and it causes some problems in navigating.

This is my costmap_common_params.yaml and local_costmap_params.yaml. Should i change update_frequency or publish_frequency??


obstacle_range: 2.5 raytrace_range:
3.0 footprint: [[ -0.146,  -0.372],
        [ 0.154, -0.372],
        [ 0.354, 0],
        [0.154, 0.372],
        [-0.146,  0.372]]

inflation_radius: 0.55

observation_sources: laser

laser: {sensor_frame: laser,
data_type: LaserScan, topic: /scan,
marking: true, clearing: true}


local_costmap:   global_frame: odom  
robot_base_frame: base_link  
update_frequency: 5.0  
publish_frequency: 2.0  
   static_map: false   
   rolling_window: true   
   height: 6.0   
   resolution: 0.05


edit retag flag offensive close merge delete


Also having the same problem. Anyone have a fix?

musiqsoulchild gravatar image musiqsoulchild  ( 2015-03-17 00:03:22 -0500 )edit

Do you have clearing observations that show that the obstacle is no longer there?

David Lu gravatar image David Lu  ( 2015-03-17 11:22:11 -0500 )edit

Not sure what you mean by clearing observations but when i restart move_base, the costmap works fine and doesn't show obstacles that aren't there. Not sure what parameters to change.

musiqsoulchild gravatar image musiqsoulchild  ( 2015-03-21 21:55:07 -0500 )edit

Obstacles are meant to stay in the costmap until something gives evidence that they're not there. That evidence could be a clearing observation, i.e. a laser reading that is behind where the obstacle is.

David Lu gravatar image David Lu  ( 2015-03-22 14:10:03 -0500 )edit

So I'm using a hokuyo urg 04 lx and for some reason when that sees a long hallway, it displays NaN in the /scan topic. This causes the local costmap to show an obstacle, and if i keep moving straight (and there is a hallway perperdincular), the obstacle keeps moving in parallel because of NaN scan.

musiqsoulchild gravatar image musiqsoulchild  ( 2015-03-22 15:24:06 -0500 )edit

I tested it without long hallways and didn't have this problem (no NaN in the scan topic), however when it sees a long hallway, the NaN ruins the local costmap. I tried to use the laser scan filters but I don't know how to filter NaN scans.

musiqsoulchild gravatar image musiqsoulchild  ( 2015-03-22 15:26:39 -0500 )edit

have you tried the

  • ~<name>/<source_name>/inf_is_valid (bool, default: false)
  • ~<name>/<source_name>/observation_persistence (double, default: 0.0)

as described ""

daniel_dsouza gravatar image daniel_dsouza  ( 2015-07-17 12:32:15 -0500 )edit

Using ROS indigo with the layered costmap and costmap plugins -- is there a way to set a decay rate or something similar so that human scans fade away even if the robot doesn't scan the area again? The output of rosparam get / | grep -in *observation_persistence* is empty for me

j_salfity gravatar image j_salfity  ( 2017-03-08 13:29:36 -0500 )edit