Purpose of clear_costmap_recovery in recovery behavior sequence

asked 2021-05-29 04:18:51 -0500

mmaissan gravatar image

Hi,

I'm fairly new to ROS. Recently, I started working with the navigation stack and implemented in on a robot, which can drive autonomously now.

From the nav_core recovery behavior, I do not understand the purpose of clear_costmap_recovery::ClearCostmapRecovery. I understand that the default sequence is as follows:

  • clear area in costmap
  • rotate in place
  • clear larger area of costmap
  • rotate again
  • Still no path available? Then stop navigating.

As per my understanding, it will literally take a defined area around the robot and "delete" its obstacles, making it assume that there is free driving space. So if my local costmap is 3 by 3 meters and I set the clear_costmap_recovery to 3 by 3 meters too, it will simply empty the costmap entirely, making it seem like there are no obstacles.

However, after its emptied, the sensor data will fill in the costmap immediately with sensor data again. To me, clearing the costmap seems unnecessary and it would make more sense to go straight to the "rotate in place" step to find actual empty space. So I don't understand the purpose of clearing the costmap.

I also watched this video, but at the "clear_costmap_recovery" step, nothing really happens, and the robot only seems to start rotating. No changes are visible in the local costmap. Can someone give me an example of which scenario or sensor configuration makes this step useful, compared to just using the rotate recovery step only?

edit retag flag offensive close merge delete