Robotics StackExchange | Archived questions

Multirobot_Map_Merge: merged map width and height varies with number of robots.

Hello fellow Ros developers,

i am using the package MultirobotMapMerge in order to merge multiple map into one however the width and the height of the final map varies with the number of robots(maps) that are being merged. I assume that this happens due to the different poses that the robots have. For example for 4 robots with poses (0,0), (1,0),(2,0),(3,0) the width of the final map is width:483 if i add 4 more following the same pattern the width will change to width:485. Is there a way to fix it and make the dimensions constant?

The reason i want to have constant dimensions is to be able to compare two occupancy grid maps "on runtime".If anyone know a way to do that with varying dimensions please let me know. Thanks in advance.

Edit: Additional the merged map is not centered correctly. There is always a difference in center as well as the dimensions between the merged map and the maps being merged. Is that a package error or did i do something wrong?

Asked by Nick_JR on 2022-06-08 16:15:19 UTC

Comments

Answers

If you can define distinctive elements in the map (angles/caves/corners/columns/doors/walls), you can use them to overlay maps accordingly (with possible corrections by changing the scale)).

You can do it by hand or with maybe PCL and RANSAC?

The two pixel difference appears to be a lidar measurement error. At a map resolution of 0.05 it is only ~10 cm.

Asked by ljaniec on 2022-06-09 02:24:29 UTC

Comments

Thanks for the quick response. First of all thanks for mentioning PCL, I didnt know it existed and i will almost certainly use it in the future but i dont think it fits what i want to do right now.Maybe i am wrong. My understanding is that in order for pcl to be able to correct the pose of the maps, both of them must be complete in order to find features that match. In my implementation i want to constantly compare two maps "on runtime". For example i have a ground thruth map and i compare it to the map produced by multi robot map merge as the robots explore an area in order to get a percentage of the map covered. I do that by comparing the data straight from the OGM messages. The root of my problem is that when the dimensions of the produced map change i cant compare the two tuples. There is probably a better way of doing this.

Asked by Nick_JR on 2022-06-09 04:54:10 UTC

The part about using them at runtime is important, you should add that in your question edit. Maybe some workaround with saving maps via a get map service could work there? You would save and compare the maps every 5-10 s, with some processing (eroding/dilating) of them as a PNG imasges, to minimize difference errors from SLAM? You could change the resolution of the maps to smaller, use opencv / shapely etc. to compare the maps

Asked by ljaniec on 2022-06-09 06:15:43 UTC