[ros-users] Different maps for navigation and path planning

Brian Gerkey gerkey at willowgarage.com
Mon Sep 6 16:28:18 UTC 2010


On Mon, Sep 6, 2010 at 5:57 AM, Christian Verbeek
<verbeek at servicerobotics.eu> wrote:
>  Is it possible to have a map used by the path planner that differs from
> the map that is used by gmapping for localization? The idea is to mark
> certain areas as forbidden so that the robot never drives through these
> areas.
>
> My understanding right now is that if I mark a cell as occupied this
> information would also be used by gmapping. If I mark to many cells
> manually this would lower the localization performance.

hi Christian,

Yes, you can supply a different map to different parts of the system,
by using standard ROS name remapping. E.g., bring up a second map
server, and remap its outputs and move_base's inputs to match:

  <node name="map_server_planner" pkg="map_server" type="map_server"
args="path-to-planner-map.yaml">
   <remap from="map" to="map_planner"/>
   <remap from="map_metadata" to="map_metadata_planner"/>
   <remap from="static_map" to="static_map_planner"/>
  </node>
  <node pkg="move_base" type="move_base" name="move_base_node" output="screen">
    <remap from="map" to="map_planner"/>
    <other remappings / parameter loads.../>
  </node>

A more compact alternative is to push the second map_server down into
a namespace, then remap only move_base's input:

  <node ns="map_planner" name="map_server_planner" pkg="map_server"
type="map_server" args="path-to-planner-map.yaml"/>
  <node pkg="move_base" type="move_base" name="move_base_node">
    <remap from="map" to="map_planner/map"/>
    <other remappings / parameter loads.../>
  </node>

	brian.



More information about the ros-users mailing list