There was an issue with a robot getting stuck while switching maps. Log analysis show that calling /start_costmap cannot end. So Using the gdb --pid XXX connecting move_base node, is stucking in StaticLayer: : onInitialize() at static_layer.cpp:94. while (!map_received_ && g_nh.ok()) { ros::spinOnce(); r.sleep(); }
I thik the reason is that the execution order of the two tasks for setting the member variable mapreceived is uncertain.
There was an issue with a robot getting stuck while switching maps. Log analysis show that calling /start_costmap cannot end. So Using the gdb --pid XXX connecting move_base node, is stucking in StaticLayer: : onInitialize() at static_layer.cpp:94.
while (!map_received_ && g_nh.ok()) { ros::spinOnce(); r.sleep(); }
I thik the reason is that the execution order of the two tasks for setting the member variable mapreceived is uncertain.https://github.com/ros-planning/navigation/blob/noetic-devel/costmap_2d/plugins/static_layer.cpp set mapreceived = false on line 91 and mapreceived = true on line 216