0
$\begingroup$

Rosanswers logo

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


Originally posted by 130s on ROS Answers with karma: 10937 on 2011-11-15

Post score: 2


Original comments

Comment by 130s on 2011-11-18:
@bhaskara sure will do. Good to know that. Thx!

Comment by bhaskara on 2011-11-17:
Next time it happens, can you try doing rostopic echo --noarr -n 1 map. That would indicate whether the map is being published.

$\endgroup$

3 Answers 3

0
$\begingroup$

Rosanswers logo

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


Originally posted by raphael favier with karma: 1382 on 2011-11-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by 130s on 2011-12-01:
I've closed this session since I haven't seen the phenomenon these days.

Comment by 130s on 2011-11-21:
@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.

Comment by davo on 2011-11-20:
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

Comment by 130s on 2011-11-18:
@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?

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by 130s with karma: 10937 on 2011-11-17

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by 130s on 2011-11-18:
@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.

Comment by dornhege on 2011-11-18:
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.

Comment by 130s on 2011-11-17:
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).

$\endgroup$
0
$\begingroup$

Rosanswers logo

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

Originally posted by lucasw with karma: 8729 on 2014-02-27

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.