0
$\begingroup$

Rosanswers logo

Hello,

I want to ask, is it possible to specify somewhere in the move_base parameter how often clear the local costmap. I want to do that because I face the problem when the local costmap add a dynamic obstacles buy after the are disappeared the costmap do not clear the space too long.

On the image below I have marked the obstacles which have already gone but they are still persist on the local costmap.

image description

EDIT 1

local costmap parameters:

local_costmap: global_frame: odom robot_base_frame: base_footprint update_frequency: 5.0 publish_frequency: 1.0 static_map: false rolling_window: true width: 4.0 height: 4.0 resolution: 0.05

common costmap:

obstacle_range: 2.5 raytrace_range: 3.0 footprint: [[-0.2, -0.2], [-0.2, 0.2], [0.2, 0.2], [0.2, -0.2]] inflation_radius: 0.1 transform_tolerance: 1.0 observation_sources: laser_scan_sensor laser_scan_sensor: sensor_frame: laser_frame data_type: LaserScan topic: filtered_scan clearing: true marking: true min_obstacle_height: 0.1 max_obstacle_height: 0.4


Originally posted by Yehor on ROS Answers with karma: 166 on 2020-05-14

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In order for the costmap to be able to clear obstacles, your observation source needs to "see" a distance greater than the distance from the observation source to the obstacle, this is part of the raytrace algorithm in the ROS Navigation stack.

Based on your parameters, it seems you have set all the right variables correctly:

  • obstacle_range: 2.5 < raytrace_range: 3.0 (raytrace_range should be more than obstacle_range)
  • marking and clearing are set to true
  • you can also try adding observation_persistence: 0.0 to ensure that obstacles are immediately cleared
  • check if your laser_scan_sensor has a maximum range value instead of inf or nan values. You can check this by doing a rostopic echo filtered_scan and inspecting the data (if you observe inf or nan values, you can use the http://wiki.ros.org/laser_filters package and use the LaserScanRangeFilter. Set the upper threshold to the max_range of your lidar and upper_replacement_value to max_range of your lidar

Originally posted by ParkerRobert with karma: 113 on 2021-03-08

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.