-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The second robot map seems not in the right position #15
Comments
Hi, you should set world_frame to something else, there should be no slashes. default is "world", you don't need to change it unless it conflicts with already existing frame (gps etc.). see http://wiki.ros.org/tf2/Migration#Removal_of_support_for_tf_prefix and http://www.ros.org/reps/rep-0105.html Setting the initial positions can be quite non-intuitive currently, because the merger does not use maps' origins and the coordinate system is always fixed in (0,0), which is a corner. You may need to offset for the origin. You need to adjust params under Have you tried using automatic merging mode (without known positions)? I see your maps do not have much overlapping space, but if you are able to put there more overlapping space, that should work for you out-of-the-box. I can take a look at your maps, but I need to have original .pgm + .yaml files for both maps to be able to use it with map_server myself. Screenshots are not helpful for debugging. If you want to work without the known initial positions the maps need to have enough overlapping space (as much as possible). If you want to work with known initial positions you need to know the ground truth transformation between maps. Then I can take a look and see what is the problem. Cheers, |
Thank you for your prompt reply! I will appreciate you for helping me have a look at my maps. Here is my original .pgm + .yaml files for both maps. Thank you very much! |
|
Thank you for your answer. I am sorry that I reply so late!
|
|
Also, when saving maps make sure to select lossless format. Your pngs are full of compression artefacts. |
|
|
Thank you! |
the problem with maps seems to be fixed. I'll take a look, but it'll take while since I'm busy these days. |
Hello |
If you are using gmapping, try to set the zero point in the middle of the map like this in your launch file:
then set the initial positions in your merging launch file to 0.0. This works fine for me, hope it helps you too. |
Thanks |
Thank you for the package. It is discovering all robots and map topics perfectly. But there was some problem when it merged the maps. The two maps were published through two rosbag. When I used the “known_init_poses” mode, it seems the transform between the two maps is not right. I call the two maps “/robot1/map” and “/robot2/map”. And I set the world_frame to “/robot2/map”. The maps published by map_server are as follows. The starting point of both maps in the ground is the same.
map1.pgm:
map1.yaml:
map2.pgm:
map2.yaml:
Here is the map_merge.launch file and I add the initial poses in it.
Here is the merged map and I set the world_frame to “/robot2/map”. But the “/robot1/map” is not in the right position.
I don't know if the parameters I set are correct. Could you please give me some help? Thank you!
The text was updated successfully, but these errors were encountered: