ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You should not set the global frame to the robot's base frame but a fixed frame. Normally, the rolling window is enabled for the local costmap and the global frame is odom. This will prevent obstacles from moving around. The way you are using the costmap is probably not really supported at all and it's just pure luck that it sort of works in your case.
Regarding your second question: Clearing of obstacles always done based on raycasting if the clearing
parameter is set for your sensor.
If you want to clear your costmaps programmatically, you can use move_base's clear_costmaps
service or implement the corresponding behavior for instance as a recovery behavior plugin. For an example, have a look at the source code of the clear_costmap_recovery
service.