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

Revision history [back]

That is true. If you want to plan a path in unknown space, you must not use a static map in your global costmap and set the size and origin parameters appropriately (0, 0) should be in the middle of your space. E.g map size 50x50m, origin -25, -25

That is true. If you want to move_base can plan a path in into unknown space, you must space if you do not use a static map in as global costmap and set the map size and origin appropriately.

Normally, when using a static map, the size of the global costmap is set to the size of the map which normally is as small as possible in the default gmapping configuration and the global planner cannot plan outside this map. To make it work, you have two choices:

  1. Make your global costmap and set the size and static map bigger, i.e. add a lot of unknown space around it. This can cost quite some memory though.

  2. Don't use a static map for planning, only the laser-based costmap created without SLAM. In that case, you need to make sure that the costmap is big enough to contain your goal point, for instance 100x100m. If you just set the size to 50x50m, the origin, i.e. the starting point of your odometry will be in one corner. Many laser scans will be outside and you can find plans only in one direction. To avoid that, you can set the origin parameters appropriately of the map and move the point (0, 0) should be right in the middle of your space. E.g map size 50x50m, origin -25, -25

    the costmap. The following configuration shows that:

x

global_costmap:
   global_frame: /map
   robot_base_frame: /base_link
   map_type: costmap
   update_frequency: 3.0
   publish_frequency: 0.0
   static_map: false
   transform_tolerance: 0.5
   width: 100
   height: 100
   resolution: 0.05
   origin_x: -50.0
   origin_y: -50.0