0
$\begingroup$

Rosanswers logo

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/Chefbot-A-DIY-Autonomous-mobile-robot-for-serving-/?ALLSTEPS#step2

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>

Originally posted by neuronet on ROS Answers with karma: 39 on 2016-08-17

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by mgruhler with karma: 12390 on 2016-08-18

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by neuronet on 2016-08-18:
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. :)

Comment by mgruhler on 2016-08-18:
I guess everybody here stumbled upon this one at least once ;-)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.