ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Make sure you are saving the map when you create it, that is step 4 of the tutorial you linked to above.

rosrun map_server map_saver -f /tmp/my_map

This should create two files associated with the map you create, my_map.yaml and my_map.pgm. If you list the files in /tmp you should see these two files.

The next thing to check is which pc you are running amcl_demo.launch on and which pc you saved the maps. If I remember the tutorials correctly, the maps are saved on the turtlebot's laptop, which amcl_demo.launch is run on the remote control laptop. We generally have to manually transfer the map files from one machine to the other for this to work. That is if you are running roslaunch turtlebot_navigation amcl_demo.launch on the remote control laptop and not ssh'ing into the turtlebot, then make sure the map files are on the remote control laptop, called the PC in the tutorials.

Make sure you are saving the map when you create it, that is step 4 of the tutorial you linked to above.

rosrun map_server map_saver -f /tmp/my_map

This should create two files associated with the map you create, my_map.yaml and my_map.pgm. If you list the files in /tmp you should see these two files.

The next thing to check is which pc you are running amcl_demo.launch on and which pc you saved the maps. If I remember the tutorials correctly, the maps are saved on the turtlebot's laptop, which amcl_demo.launch is run on the remote control laptop. We generally have to manually transfer the map files from one machine to the other for this to work. That is if you are running roslaunch turtlebot_navigation amcl_demo.launch on the remote control laptop and not ssh'ing into the turtlebot, then make sure the map files are on the remote control laptop, called the PC in the tutorials.

If you move the two map files to a new location, you will need to edit the .yaml file since it hardcodes the full path of the .pgm file. You can use gedit or any other text editor on the .yaml map file. The first line of this file should be the location of the .pgm file which you need to update.