"map update loop missed" happen frequently when robot path plan and run
Hello,
My robot is planning path and controlling velocity with move_base.
In many cases, it seems to be working properly.
However, there were times when it suddenly started rotating in place or recovery behaviors was run even though there were no obstacles.
I checked rosout log at this time, and I found that "map update loop missed" log remained.
Further investigation revealed the following.
- I set update_frequency of global costmap to 10 Hz, but there was a delay in seconds, and in the worst case, it was delayed by about 20 seconds.
- I analyzed bag file using rqt_bag, footprint of local costmap was constantly updated, but only footprint of global costmap was rarely updated.
- These phenomena occurred only during path planning and running, and did not occur when no goal was set for move_base. In those idle time, also footprint of global costmap was published in correct frequency. (I set shutdown_costmaps of move_base to true.)
- I compiled move_base package with catkin_make using -DCMAKE_BUILD_TYPE=Release.
- I also watched the CPU and memory resources, but it seemed that there was still about 40% left.
- The size of map (.pgm) that global costmap subscribe is over 30 MB...
I don't know what to look for, so please give me some wisdom.
How to fix it is also welcome.
Thanks in advance.
costmap_params_common.yaml
robot_radius: 0.35
footprint_padding: 0.05
obstacle_layer:
observation_sources: scan1 scan2 scan3
obstacle_range: 4.5
raytrace_range: 4.9
track_unknown_space: true
footprint_clearing_enabled: false
scan1: {sensor_frame: scan1_frame, data_type: LaserScan, topic: scan1, marking: true, clearing: true}
scan2: {sensor_frame: scan2_frame, data_type: LaserScan, topic: scan2, marking: true, clearing: true}
scan3: {sensor_frame: scan3_frame, data_type: LaserScan, topic: scan3, marking: true, clearing: true}
global_costmap_params.yaml
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 10.0
publish_frequency: 0.5
width: 10.0
height: 10.0
plugins:
- {name: static_layer, type: 'costmap_2d::StaticLayer'}
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
inflation_layer:
cost_scaling_factor: 5.0
enabled: true
inflate_unknown: false
inflation_radius: 1.2
resolution: 0.025
static_map: true
rolling_window: false
transform_tolerance: 0.5
meter_scoring: true
local_costmap_params.yaml
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 10.0
publish_frequency: 0.2
width: 7.0
height: 7.0
plugins:
- {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
- {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
inflation_layer:
cost_scaling_factor: 5.0
enabled: true
inflate_unknown: false
inflation_radius: 1.0
resolution: 0.025
static_map: false
rolling_window: true
transform_tolerance: 0.5
meter_scoring: true