Comparing two Occupancy Grids
I am attempting to find a way of comparing two stage occupancy grids: the first one is generated by slam gmapping (published on the "map" topic) and the second comes from the rasterization of the stage floor model (myModel.Rasterize(myRasterArray, this->width, this->height, cellwidth, cellheight) - see this page http://rtv.github.io/Stage/classStg_1_1Model.html). I managed to access both of these grids, and I generated both grids with the same height, width and resolution. Now, I am wondering if both grids possess the same coordinates; for instance, would comparing the cells at position (1,2) correspond to the same cell on both maps? If not, is there a way of superimposing both grids?
[Edit] I printed the occupancy grids obtained, and the two aren't even oriented in the same way (see picture here http://tinypic.com/r/x2ph5l/5). #1 is the slam map, #2 is the map extracted from the Stage model, and the image to the right is the bitmap used to build the Stage map (yes, a smiley face!). Note that the robot is wandering inside the white area, which explains why image #1 is just the inside of the smiley face. All in all, I need to find a way of aligning the grids... Please help?
[Edit2] I'm attempting to use the debug option of mapstitch which is supposed to "save the current_stitch.pgm and current_map.pgm, i.e. the stitched maps and the current map as seen on /map.", but there is nothing being outputted. Is this a bug? Here's my launch file:
<launch>
<master auto="start"/>
<param name="/use_sim_time" value="true"/>
<node pkg="mapstitch" type="ros_mapstitch" name="ros_mapstitch">
<param name="debug" value ="true" />
</node>
</launch>
So may I ask if you know a way to do things around - having two occupancy and compare them to get coordinates? Please advice me. Thank you.
@Avonic: that sounds like you have a different question. You should ask a new question.