How to implement a temporal occupancy grid?
I am trying to implement a temporal occupancy grid for my mobile robot for obstacle detection. For my mapping, I am trying to use the grid_map package. Say at time t my laser sensor gives a me a particular set of readings z and I fill up a grid_map in the base_link frame frame. Now at time t+1 my robot moves in some direction and I create another occupancy grid. My question is, how do I align these two occupancy grids that I have just created.
Right now, I'm just computing the relative transform between t and t+1 and then iterating through all points of my t th grid map to see if they are in the t+1 th grid map.