Ask Your Question
0

PR2 move_base how to get map

asked 2013-01-17 04:49:36 -0500

jys gravatar image

updated 2014-11-22 17:05:39 -0500

ngrennan gravatar image

I bring up pr2 in Gazebo with

roslaunch pr2_gazebo pr2_emtpyworld.launch

PR2 comes up and I want to use move_base programatically to move it to some (x,y) coordinate. So I tried to bring up move_base server with following..

rosrun move_base move_base

But it asks for map, the tutorials in pr2_simulator and navigation stack only talk about pre-defined maps.

[ INFO] [1358441051.857729791]: Subscribed to Topics: 
[ INFO] [1358441051.868857033]: Requesting the map...
[ INFO] [1358441051.870152566]: Still waiting on map...

Is it possible to get a map out of Gazebo? Or, am I suppose to be manually creating a map file? I read similar questions on this forum, but still confused.. Since I am fairly new to ROS/ navigation stack / map, please refer to specific example. Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-17 05:55:02 -0500

dornhege gravatar image

You'll need to build a map using SLAM, unless you want to create that by hand. See, e.g. this tutorial:

http://www.ros.org/wiki/pr2_simulator/Tutorials/BuildingAMapInSimulation

Other alternatives are to use the /odom frame for navigation, but that will drift over time on a real robot, so you can't drive to a specific x,y then.

However, building a map and localizing in it will only work if there is something in the world, i.e. it won't work for the empty world.

edit flag offensive delete link more

Comments

Hmm.. So with pr2_empty_world.launch, I will not be able to build a map out of it. Let me try to clarify. So, in order to localize correctly, some objects must be in sight of PR2 when mapping starts. Am I understanding correctly?

jys gravatar imagejys ( 2013-01-17 05:58:48 -0500 )edit

Yes. Actually any empty image will be a correct map for the empty world. Obviously the robot can't localize if there is nothing to recognize.

dornhege gravatar imagedornhege ( 2013-01-17 06:03:19 -0500 )edit

Then, instead of using SLAM, is it somehow possible to use x,y location provided by Gazebo? I want to be complete sync with location coordinate inside Gazebo.. If it is possible, do you know of examples or have rough idea on how to accomplish it? Thanks!

jys gravatar imagejys ( 2013-01-17 06:11:31 -0500 )edit

For simulation you could use fake localization: http://www.ros.org/wiki/fake_localization

dornhege gravatar imagedornhege ( 2013-01-17 06:31:44 -0500 )edit

That looks great. But still confused.. What is correct step of launching stuff.. I launch pr2_emptyworld and run fake_localization? Is something missing inbetween? Do you know why fake_localization complains about Dropped 100.00% of messages so far. Please turn the [ros.fake_localization. blah blah

jys gravatar imagejys ( 2013-01-17 07:09:28 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-01-17 04:49:36 -0500

Seen: 686 times

Last updated: Jan 17 '13