why the costmap is not updated while global planner is running?
In the navigation stack, I've configured it so the global planner is run every 2 to 4 seconds. The planner I'm using can take up to a few seconds to calculate the new global plan (specially when in debugging mode). When the global planner is replanning, the robots stops, which is not the desirable behaviour.
To trace this behaviour I checked the logs and found the following message:
The /scan observation buffer has not been updated for 1.00 seconds, and it should be updated every 0.30 seconds.
which end up blocking move_base entirely:
[/move_base]:Sensor data is out of date, we're not going to allow commanding of the base for safety
I've checked the scan message and it's publishing at 50Hz constant so this shouldn't be the issue.
Careful inspection of the logs shows that the costmap stops updating while global planning is running and resumes after the planning is done.
Browsing move_base's code, the global planner run on it's own thread, so I don't see why should it block the costmap's updates.
Has anyone had similar issues? Is this a bug? Am I missing something?
EDIT: I'm on groovy
I've changed the call to ros::spin() to a MultiThreadedSpinner on move_base and now the robot can re-plan and control (using the latest plan) at the same time. Still not sure if the behaviour was intended or not.