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

Couldn't save map file [closed]

asked 2016-02-11 13:28:32 -0600

joe.s gravatar image

updated 2016-02-12 10:27:19 -0600

I'm running a fresh indigo install on Ubuntu 14.04. I'm going through the indigo turtlebot simulation mapping and navigation tutorial (found here). I get this error when trying to save my map:

$ rosrun map_server map_saver -f mymap
[ INFO] [1455210144.655511470]: Waiting for the map
[ INFO] [1455210144.863940939]: Received a 512 X 512 map @ 0.050 m/pix
[ INFO] [1455210144.863974294]: Writing map occupancy data to mymap.pgm
[ERROR] [1455210144.864011886]: Couldn't save map file to mymap.pgm

I've not been able to find any information on this so some guidance would be appreciated. Thank you.

EDIT1:
So, saving using the absolute path seems to have resolved the issue with saving...
But, I receive this error when trying to load that saved file.
I can cd in to that directory and see the .pgm and .yaml files, so they're there...

process[move_base-5]: started with pid [7198]
terminate called after throwing an instance of 'std::ios_base::failure'
what():  basic_filebuf::underflow error reading the file
[ WARN] [1455230430.987174577, 512.240000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 512.24 timeout was 0.1.
[map_server-1] process has died [pid 7174, exit code -6, cmd /opt/ros/indigo/lib/map_server/map_server /home/developer-admin/indigo_workspace/sandbox/maps/ __name:=map_server __log:=/home/developer-admin/.ros/log/3fab6fa6-d10f-11e5-82df-d850e6c4e2f6/map_server-1.log].
log file: /home/developer-admin/.ros/log/3fab6fa6-d10f-11e5-82df-d850e6c4e2f6/map_server-1*.log
[ WARN] [1455230436.087845155, 517.340000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: . canTransform returned after 0.1 timeout was 0.1.

EDIT2:
This is the command I use to try to open the saved map file... it uses the absolute path to where the map file is saved.

roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/developer-admin/indigo_workspace/sandbox/maps/

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by joe.s
close date 2016-02-11 16:26:14.029516

Comments

This is a permission problem. Try to save in another place.

nampi gravatar image nampi  ( 2016-02-11 16:19:00 -0600 )edit

Ok. That seems to have done it. I should have read/write permissions across the board... but I guess not. Thanks. ... but now it won't open the map file.

joe.s gravatar image joe.s  ( 2016-02-11 16:25:55 -0600 )edit

@joe.s Write the command which you use to open a map file.

nampi gravatar image nampi  ( 2016-02-11 16:54:33 -0600 )edit

@nampi
and added above

roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/developer-admin/indigo_workspace/sandbox/maps/

joe.s gravatar image joe.s  ( 2016-02-12 10:26:30 -0600 )edit

The right command is: roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/developer-admin/indigo_workspace/sandbox/maps/mymap.yaml

nampi gravatar image nampi  ( 2016-02-12 12:48:55 -0600 )edit

@nampi
When doing that, I receive the error:
Map_server could not open /home/developer-admin/indigo_workspace/sandbox/maps/mymap.yaml.

joe.s gravatar image joe.s  ( 2016-02-12 13:20:18 -0600 )edit

Use the full path in the first command too.

rosrun map_server map_saver -f /home/developer-admin/indigo_workspace/sandbox/maps/mymap
roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/developer-admin/indigo_workspace/sandbox/maps/mymap.yaml
nampi gravatar image nampi  ( 2016-02-12 13:45:30 -0600 )edit

@nampi
alright, it loaded this time... although I get a You must specify at least three points for the robot footpinrt, reverting to previous footprint error... I'll search for that and see what's going on.
Thanks for the help.

joe.s gravatar image joe.s  ( 2016-02-12 14:09:35 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-11 16:09:01 -0600

Looking at the code it appears that this is due a fopen call failing. A likely cause for this are either inappropriate permissions (i.e. do you have write permissions for the folder from which you run map_saver?) or no disk space left.

edit flag offensive delete link more

Comments

it must have been a permissions issue. but now I'm not able to load the map file.

joe.s gravatar image joe.s  ( 2016-02-11 16:46:45 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-11 13:28:32 -0600

Seen: 6,218 times

Last updated: Feb 12 '16