move_base global costmap is not updated when removing an object/obstacle from the environment
Hello everyone!
I am currently working on a project using the ROS 1 navigation stack and for the past few weeks I have been struggling with this issue regarding the proper updating of move_base's global costmap when removing an obstacle from the static map. In this situation the mapping is done using the slam-toolbox package. The issue appears when switching from mapping mode to localization mode. While mapping, all the obstacles are marked in the static map and in turn the global costmap is tracking all the changes in the static map. Once I switch to localization mode, and no more changes are brought to the static map, if i remove one obstacle from the environment and my robot is close to it (the robot has 4 cameras as observation sources) I would expect for that obstacle to be cleared from the global costmap, at least as long as the cameras can see that it is not there, even though the obstacle would still be marked in the static map. I believe that the issue is related to some poor configuration of the move_base costmaps but no new combination of parameters or new configuration seems to lead me to the desired behavior.
I am attaching here the current configuration I use for my costmaps and some screenshots with the issue.
Costmaps configuration:
costmap_common.yaml
footprint: [[-0.475, -0.34], [-0.475, 0.34], [0.475, 0.34], [0.475, -0.34]]
footprint_padding: 0.02
robot_base_frame: base_footprint
update_frequency: 8.0 # Default 4.0
publish_frequency: 6.0 # Default 3.0
transform_tolerance: 0.5
resolution: 0.05
#always_send_full_costmap: true
inflation:
inflation_radius: 1.0
#layer definitions
static:
map_topic: /map
subscribe_to_updates: true
virtual_walls_static_map:
map_topic: /virtual_walls_map
subscribe_to_updates: true
use_maximum: true
track_unknown_space: false
obstacles_laser:
observation_sources: ultrasonics_warn ultrasonics_alert camera_1_obstacles camera_2_obstacles camera_3_obstacles camera_4_obstacles camera_1_laser camera_2_laser camera_3_laser camera_4_laser
camera_1_laser: { data_type: LaserScan, clearing: true, marking: true, topic: /camera_1/laser_scan, obstacle_range: 5.5, raytrace_range: 6.0 }
camera_2_laser: { data_type: LaserScan, clearing: true, marking: true, topic: /camera_2/laser_scan, obstacle_range: 5.5, raytrace_range: 6.0 }
camera_3_laser: { data_type: LaserScan, clearing: true, marking: true, topic: /camera_3/laser_scan, obstacle_range: 5.5, raytrace_range: 6.0 }
camera_4_laser: { data_type: LaserScan, clearing: true, marking: true, topic: /camera_4/laser_scan, obstacle_range: 5.5, raytrace_range: 6.0 }
camera_1_obstacles: {data_type: PointCloud2, clearing: true, marking: true, topic: /camera_1/obstacles_cloud, obstacle_range: 5.5, raytrace_range: 6.0}
camera_2_obstacles: {data_type: PointCloud2, clearing: true, marking: true, topic: /camera_2/obstacles_cloud, obstacle_range: 5.5, raytrace_range: 6.0}
camera_3_obstacles: {data_type: PointCloud2, clearing: true, marking: true, topic: /camera_3/obstacles_cloud, obstacle_range: 5.5, raytrace_range: 6.0}
camera_4_obstacles: {data_type: PointCloud2, clearing: true, marking: true, topic: /camera_4/obstacles_cloud, obstacle_range: 5.5, raytrace_range: 6.0}
ultrasonics_warn: {data_type: PointCloud, clearing: false, marking: true, topic: /ultrasonic/warn_point_cloud/combined, obstacle_range: 5.5, raytrace_range: 6.0}
ultrasonics_alert: {data_type: PointCloud, clearing: false, marking: true, topic: /ultrasonic/alert_point_cloud/combined, obstacle_range: 5.5, raytrace_range: 6.0}
#laser: {data_type: LaserScan, clearing: true, marking: true, topic: camera/laser_scan, inf_is_valid: true, obstacle_range: 5.5, raytrace_range: 6.0}
#camera_1_ground: {data_type: PointCloud2, clearing: false, marking: true, topic: /camera_1/ground_cloud, obstacle_range: 5.5, raytrace_range: 6.0}
#camera_2_ground: {data_type: PointCloud2, clearing: false ...
Have you seen #q316191?
Hey @tryan! Thanks for the tip...checking it now to see maybe the information there can help me!
Coming back with an update, the information in the thread linked above helped me in fixing the issue! Thanks @tryan for your help!