Ask Your Question
1

map_saver doesn't return from "Waiting for the map"

asked 2011-11-15 14:41:08 -0500

updated 2011-11-16 11:39:45 -0500

I'm doing turtlebot's tutorial "Build a map with SLAM" and can't generate a map file. Actually I succeeded only first 2 times. Since then map_saver always says:

turtlebot@turtlebot-1:~$ rosrun map_server map_saver -f /tmp/my_map
[ INFO] [1321409343.272498323]: Waiting for the map
^C         <---- I manually killed 
^CTerminated
turtlebot@turtlebot-1:~$

and the process map_server keeps consuming around 95%.

When I succeeded:

turtlebot@turtlebot-1:/tmp$ rosrun map_server map_saver -f /tmp/my_map
[ INFO] [1321405355.532849715]: Waiting for the map
[ INFO] [1321405355.807251282]: Received a 480 X 544 map @ 0.050 m/pix
[ INFO] [1321405355.812693593]: Writing map occupancy data to /tmp/my_map.pgm
[ INFO] [1321405355.851996657]: Writing map occupancy data to /tmp/my_map.yaml
[ INFO] [1321405355.853300442]: Done

I used teleop to move turtlebot.

Env) Ubuntu 10.04, ROS/turtlebot electric

edit retag flag offensive close delete

Comments

Next time it happens, can you try doing `rostopic echo --noarr -n 1 map`. That would indicate whether the map is being published. bhaskara ( 2011-11-17 08:50:13 -0500 )edit
@bhaskara sure will do. Good to know that. Thx! IsaacSaito ( 2011-11-18 08:31:21 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2011-11-18 01:08:42 -0500

raphael favier gravatar image

it seems to me that your nodes are not able to communicate with each other. you could try running rxgraph next to the two nodes and see if the actually share the same map topic.

if not, make sure that

  • a roscore is still running
  • both nodes can see the same master

quick question: are both nodes running on the same machine?

Raph

edit flag offensive delete publish link more

Comments

@raphael favier thx. Next time the issue occurs then I'll check if nodes are connected on rxgraph. Yes gmapping_demo and map_saver are running on the same machine, so that they should be using the same master. In my understanding roscore is already run by the service 'turtlebot' right? IsaacSaito ( 2011-11-18 08:36:28 -0500 )edit
hi, I was doing this on a custom bot start off with basics, timesync! Ensure all your nodes/topics/tf's are named properly esp laser scan . follow the diagnostics for tf. i was dropping odom stationary/wireless range/usb b/w. The tf diags/trouble guides very good, check logs...good luck davo ( 2011-11-20 20:34:28 -0500 )edit
@davo thx for the interest but is your comment about my question? You mentioned several things (timesync, laser scan, tf etc.) but intuitively I don't figure out how they are associated with my issue and what can I do for the problem. IsaacSaito ( 2011-11-21 00:32:08 -0500 )edit
I've closed this session since I haven't seen the phenomenon these days. IsaacSaito ( 2011-12-01 16:03:33 -0500 )edit
1

answered 2014-02-27 06:40:55 -0500

This is the answer to my own map saving problem that led to the "waiting for the map" hanging problem (which I could only ctrl-z kill-9 kill, ctrl-c couldn't stop it). My OccupancyGrid map was actually on /map2d, so I needed to argument remap:

rosrun map_server map_saver -f map /map:=/map2d

The proper output is this:

[ INFO] [1393526083.353818074]: Waiting for the map
[ INFO] [1393526083.936695077, 256.619000000]: Received a 480 X 480 map @ 0.050 m/pix
[ INFO] [1393526083.936841755, 256.619000000]: Writing map occupancy data to map.pgm
[ INFO] [1393526083.946531480, 256.620000000]: Writing map occupancy data to map.yaml
[ INFO] [1393526083.946678716, 256.620000000]: Done
edit flag offensive delete publish link more
1

answered 2011-11-17 08:09:03 -0500

updated 2011-11-17 09:11:57 -0500

Though this can't be the permanent solution, I found after rebooting OS saving map works fine. But still the issue occasionally occurs. At least at this moment there could be some tips and do I just understand that the issue happens? Hope this won't happen when I try very large room...

And I just realized myself that some of my question I asked here were solved by just rebooting OS. I know rebooting is often an ultimate solution for software development and from next time I'll try that before asking question.

edit flag offensive delete publish link more

Comments

Though I'm not sure if this is taking effect or not, I try not to let gmapping-demo run alone for longer time after I killed teleop (or any other measure to move Turtlebot). IsaacSaito ( 2011-11-17 08:10:27 -0500 )edit
Are you killing gmapping before saving the map? Then this is the problem. Regarding rebooting: If that solves a problem once it's OK. If the problem comes back and can only be solved by rebooting it's a problem to report here. dornhege ( 2011-11-18 01:34:50 -0500 )edit
@dornhege thanks, and no, I keep gmapping_demo running until I see map_saver ends. I'll spend more time and see how it goes. Maybe only rebooting the service 'turtlebot' might be enough in my case, but anyway I'll still see. IsaacSaito ( 2011-11-18 08:33:15 -0500 )edit

Your Answer

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

Add Answer

[hide preview]

Stats

Asked: 2011-11-15 14:41:08 -0500

Seen: 979 times

Last updated: Feb 27