Nav Stack: one map for AMCL and one for move_base?
I need to run AMCL and Movebase from two different maps as there are many locations in an outdoor map that the robot would get stuck in gravel, rocks, bushes, etc that are below the level of the laser scanner. AMCL needs to use the raw map from gmapping, but move_base should use a map that I have manually added exclusion zones to for path planning.
I've made some progress setting up two different map servers and remapping output of one to planner_map.
<!-- Run the map server for AMCL map-->
<node name="map_server" pkg="map_server" type="map_server" args="$(find my_robot_name_2dnav)/map.yaml"/>
<!-- Run the map server for MOVE_BASE map -->
<node name="planner_map_server" pkg="map_server" type="map_server" args="$(find my_robot_name_2dnav)/map_backyard.yaml">
<remap from="map" to="planner_map"/>
</node>
I changed Global Planner YAML file to watch new map for move_base (I think this is correct, please tell me if not)
global_costmap:
global_frame: /planner_map
robot_base_frame: base_link
update_frequency: 3.0
static_map: true
And now realize I need to have AMCL use one map for location but output the transform to the other map for use by move_base.
[ WARN] [1529387937.537219284]: Timed out waiting for transform from base_link to planner_map to become available before running costmap, tf error: canTransform: target_frame planner_map does not exist. canTransform: source_frame base_link does not exist.. canTransform returned after 0.100704 timeout was 0.1.
Wondering also if I need to double up on the ODOM base_link transforms to make this work.
I found this thread on an external site dealing with this topic but the conversation doesn't cover these points and it's 8 years old so unknown how relevant it is. http://ros-users.122217.n3.nabble.com...
So I have four questions:
1 - How do I get AMCL to output transform to the planner_map in addition to the regular map?
2 - Will I have to duplicate ODOM to base_link transform with different name to get transform from AMCL?
3 - Is the modification in the global costmap yaml lfile the correct way to get move_base to use the secondary map?
4 - Is there an easier way to do this that you can point me to?
Thanks in advance for your help. Using ROS Kinetic, Ubuntu 14.04