how can I set the position of my robot on a openstreet map in order to use move base?

asked Apr 16 '14

jules gravatar image

updated Apr 18 '14

Hello, I'm a student (novice with ROS) and I need to set the position of my robot on a map which I took from OpenStreetMap. I can see this map on Rviz and I visualize the displacement of my robot thanks to the GPS data via the package GPS common. Now I have 2 tf trees : one until the odom frame and the second for the map to local_map generated by openstreepmap.

I have to connect these 2 together but I don't know how. I have tried with gmapping but the problem was to give the exact position of my robot on the local_map. Thank you for your help!!

Preview: (hide)

Comments

Have you tried to use [amcl](http://wiki.ros.org/amcl)?

AbuIbra gravatar image AbuIbra  ( Apr 18 '14 )edit

In fact, I try to use move base on a map generated by openstreetmap. According to me, AMCL can't initialize the position of my robot on this map. The goal of my project is to move via move base and to create a second map via gmapping in order to visualize obstacles on the openstreetmap. I used gmapping in same time with move base and the link betweem the 2 frames (one for the robot and the other for the generated map) was done but I was unable to set the initial position of my robot on the map. I don't know if It's easy to understand but I search a way to link these 2 frames and to initialize the position. Thank you very much ! My 2 tf trees are : 1) sensors-->base_link-->base_footprint-->odom 2) local_map-->map I had via gmapping : sensors-->base_link-->base_footprint-->odom-- ...(more)

jules gravatar image jules  ( Apr 19 '14 )edit

Is "/local_map" the frame of the map created by GMapping? And if so tell me how /local_map and /map are linked? is local_map-->map link something you can choose freely? If you answer those two questions, I think I have a good idea for you

AbuIbra gravatar image AbuIbra  ( Apr 20 '14 )edit

In fact, I didn't use GMapping to create the frame "/local_map". I Uploaded a map from openstreetmap (http://www.openstreetmap.org/export#map=8/50.512/4.477) and I used the package "osm_cartography" to show the map on rviz. The launch file used to see the map :

jules gravatar image jules  ( Apr 20 '14 )edit

launch file : <launch> <arg name="url" default="package://osm_cartography/tests/maprobot.osm"/> <node pkg="tf" type="static_transform_publisher" name="local_map_tf" args="598022.3 5633435.3 0 0 0 0 1 map local_map 100"/> <node pkg="osm_cartography" type="osm_server" name="osm_server"/> <node pkg="osm_cartography" type="viz_osm" name="viz_osm"> </node> </launch>

jules gravatar image jules  ( Apr 20 '14 )edit

So, I have to create a link between the frame "/map" and "/local_map" in order to see the generated map on rviz (frame=local_map). I hope that is better explained.

jules gravatar image jules  ( Apr 20 '14 )edit