Ask Your Question
0

amcl demo: map_server could not open yaml file (yaml file exists)

asked 2016-08-17 07:54:57 -0600

neuronet gravatar image

updated 2016-08-18 09:10:01 -0600

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: image description

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>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2016-08-18 07:09:15 -0600

mgruhler gravatar image

I guess you are missing a / before home, it should probably be:

roslaunch chefbot_gazebo amcl_demo.launch map_file:=/home/neuronet/hotel_world.yaml
edit flag offensive delete link more

Comments

Dear me I am such a noob not just to Ros but to *Nix. Thank goodness that I just halted design for 36 hours because of this mistake I am super efficient! On the plus side, I will not make this mistake again. :)

neuronet gravatar imageneuronet ( 2016-08-18 09:07:43 -0600 )edit
1

I guess everybody here stumbled upon this one at least once ;-)

mgruhler gravatar imagemgruhler ( 2016-08-18 09:39:27 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-17 07:54:57 -0600

Seen: 3,953 times

Last updated: Aug 18 '16