grid_map icon indicating copy to clipboard operation
grid_map copied to clipboard

Integrate a static gridmap into a local gridmap

Open BIRL-xu opened this issue 3 years ago • 2 comments

Hi, I have a static gridmap with size 100mx100m converted from ros occupancy grid map, and a local gridmap with size 20mx10m built online. The local gridmap would be moved with robot. I want to integrate the grid value in the overlapping area between two maps into the local gridmap. Could you give me some tips how to implement this? I'm a beginner for this great library. Thank you very much!

BIRL-xu avatar Jan 27 '22 03:01 BIRL-xu

Hi @BIRL-xu,

Interesting question, I think you have to work out these questions:

  • Align the maps first, is this given?
  • Get the corresponding values of the overlapping grid maps. You should be able to calculate overlapping grid cells with .position() function and such which can be found in the core library.
  • Once you have the overlapping values, you have to think about how to fuse the values. The simplest solution is just averaging the height values. But you can also do weighted average, kalman filtering, etc.

I hope this helps.

maximilianwulf avatar Jan 27 '22 14:01 maximilianwulf

Thank you for your reply, @maximilianwulf

  • I know the transformation between two maps, so I can transform the point in static map to the one in local map.
  • I'm not sure if there is an efficient way to find out the overlapping area between two maps, I'm learning class PolygonIterator and SubmapIterator for this.
  • Actually, I'm doing a cost map just like Costmap2D, so I think fuse the grids with the maximum cost is ok.

BIRL-xu avatar Jan 28 '22 00:01 BIRL-xu