Re: [ros-users] Different maps for navigation and path plann…

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Brian Gerkey
Date:  
To: ros-users
Subject: Re: [ros-users] Different maps for navigation and path planning
On Mon, Sep 6, 2010 at 5:57 AM, Christian Verbeek
<> 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.