Map update loop missed for a very long time

asked 2021-07-06 07:01:41 -0500

rappy gravatar image

updated 2021-07-10 01:31:00 -0500

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:image description

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?

edit retag flag offensive close merge delete

Comments

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.

Morgan gravatar image Morgan  ( 2021-07-10 11:31:42 -0500 )edit

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.

rappy gravatar image rappy  ( 2021-07-15 03:46:35 -0500 )edit