Map update loop missed for a very long time
I am running navigation stack on Jetson Nano with ROS Melodic installed. However, a warning occurs for the map update loop and loop is missed for more than 50 seconds time to time. Robot is also unable to navigate during this time and footprint is also doesn't move. My current map is 4000x4000 px with a 0.05 resolution. Global and Local costmap parameters are below.
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 5.0
publish_frequency: 5.0
width: 40.0
height: 40.0
resolution: 0.1
origin_x: -20.0
origin_y: -20.0
static_map: true
rolling_window: false
local_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 4.0
publish_frequency: 4.0
width: 10.0
height: 10.0
resolution: 0.1
static_map: false
rolling_window: true
always_send_full_costmap: false
This is the terminal output:
Edit : I have managed to find source of the delay it is caused by the recovery behaviour called clear_costmap_recovery. Once it is triggered clear signal for obstacle_layer clearing sent however, for some reason it takes a lot of time to clear and recover new map and robot doesn't move during this time. Anyone have an idea about the solution of this?
Just some random ideas: I'd suggest rendering the costmaps in rviz to see if something looks odd (maybe a LIDAR hit sometimes registering on the robot itself, etc.). Also you could try reducing the size of the local costmap, and the update/publish frequency of the global costmap.
Well the thing is clear_costmaps solves the problem since it removes obstacles from the costmaps and it actually takes much less time compared to clear_costmap_recovery. I haven't notice anything suspicious in Rviz and since I have footprint_clearing active LiDAR hits that are on the robot cleared automatically. I have tried changing update rates but problem still persists. So, for now I am using clear_costmap service.