Right now whenever segbot_logical_translator updates the map being used by navigation, it waits 1 second arbitrarily after publishing the map after which it assumes the map has been changed. This is bad for 2 reasons:
1) Under greater computational load where the map update process can take more than 1 second - ex. Some of the observations returned after approaching a door may be wrong as move_base may not have updated to the map where doors are not marked as obstacles.
2) The general case where the update is really quick (<< 1 second) - We wait unnecessarily after the action is complete.
A better way of doing so would be to read the map_load_time of the costmap (hoping that it is set to the time the actual map was loaded in).
Right now whenever segbot_logical_translator updates the map being used by navigation, it waits 1 second arbitrarily after publishing the map after which it assumes the map has been changed. This is bad for 2 reasons: 1) Under greater computational load where the map update process can take more than 1 second - ex. Some of the observations returned after approaching a door may be wrong as move_base may not have updated to the map where doors are not marked as obstacles. 2) The general case where the update is really quick (<< 1 second) - We wait unnecessarily after the action is complete.
A better way of doing so would be to read the map_load_time of the costmap (hoping that it is set to the time the actual map was loaded in).