how can I set the position of my robot on a openstreet map in order to use move base?
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!!
Have you tried to use [amcl](http://wiki.ros.org/amcl)?
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)
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
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 :
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>
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.