amcl demo: map_server could not open yaml file (yaml file exists)
tl;dr
I am trying to open amcl demo with:
roslaunch chefbot_gazebo amcl_demo.launch map_file:=home/neuronet/hotel_world.yaml
And I am getting error:
Map_server could not open home/neuronet/hotel_world.yaml
Long version
I'm in indigo, ros version 1.11.20 on Ubuntu 14, and I am working through a project (chefbot) that is based on turtlebot:
http://www.instructables.com/id/Chefb...
I have run the gmapping_demo and created a map, and saved the map using
rosrun map_server map_saver -f ~/hotel_world
This has saved hotel_world.yaml and hotel_world.pgm in my home directory. Then the goal is to run the amcl demo. First (as instructed at instructables) I open the robot in gazebo, which works:
roslaunch chefbot_gazebo chefbot_hotel_world.launch
And then I launch the amcl_demo:
roslaunch chefbot_gazebo amcl_demo.launch map_file:=home/neuronet/hotel_world.yaml
It seems to start working (nodes start) but eventually I get the error that the map server could not open the yaml file:
core service [/rosout] found
process[map_server-1]: started with pid [6488]
process[amcl-2]: started with pid [6489]
process[move_base-3]: started with pid [6491]
**[ERROR] [1471437118.250759705]: Map_server could not open home/neuronet/hotel_world.yaml.**
Strangely, the. yaml file does exist in the intended directory. Here are the yaml file contents:
image: /home/neuronet/hotel_world.pgm
resolution: 0.010000 origin:
[-11.240000, -12.200000, 0.000000]
negate: 0 occupied_thresh: 0.65
free_thresh: 0.196
Further, the pgm file (image) does exist, here it is:
Note I'm working with rospy, if that matters (any technical c++ stuff will likely go over my head).
Finally, here is the file amcl_demo.launch file:
<launch>
<!-- Map server -->
<arg name="map_file" default="$(find chefbot_gazebo)/maps/playground.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<!-- Localization -->
<arg name="initial_pose_x" default="0.0"/>
<arg name="initial_pose_y" default="0.0"/>
<arg name="initial_pose_a" default="0.0"/>
<include file="$(find chefbot_bringup)/launch/includes/amcl.launch.xml">
<arg name="initial_pose_x" value="$(arg initial_pose_x)"/>
<arg name="initial_pose_y" value="$(arg initial_pose_y)"/>
<arg name="initial_pose_a" value="$(arg initial_pose_a)"/>
</include>
<!-- Move base -->
<include file="$(find chefbot_bringup)/launch/includes/move_base.launch.xml"/>
</launch>