ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Hello, what is probably happening is that the update_frequency for global_costmap is not zero, so it gets updated with what the sensor sees. As it cannot see your fake obstacles, they get removed from the costmap. So some solutions:

  1. Use hydro navigation stack: with the new multi-layer costmaps, the static (already present in the bitmap) obstacles are never removed. Maybe the best you can do, if you are not forced to use groovy or an earlier version.

  2. Set update_frequency to 0: not a good idea because you don't incorporate new information into the map.

  3. Use a "virtual sensor" that can "see" obstacles with known global pose. Here is the one I did recently: https://github.com/yujinrobot/kobuki-x/tree/hydro-devel/virtual_sensor. Note that is very experimental code, and we have not even released on ros, so... don't expect it to work fine out of the box. You can provide columns and walls, but maybe I'll incorporate other shapes as we need them. I use to avoid horrible tables low enough to cut our robot's head but with only one leg in the center, far away from the border "blade".

Options 1 and 3 are not mutually exclusive: 1 is trivial to use, but not flexible, and makes you add "false" information to the map, what can be harmful in some cases (amcl for example uses just the bitmap, that contains fake obstacles that he cannot match with laser data). 3 requires extra effort, but is very flexible.