Skip to main content

In general you have to assign some probability distribution to your map or cells individually and update them iteratively.

In the very simple case you can just apply a low-pass filter to each of your cells. Like that: $p[t] = a*p[t-1] + (1-a)*I(occupied)$ where I is an indicator function which is set to 1 if current lidar measurement shows that cell is occupied and to 0 otherwise.

Better way is to look at SLAM methods like FastSLAM. Which use particles and Kalman filters underneath. Comparing to the case I described above, Kalman filter will produce better estimates, because it is optimal in the sense that it minimizes variances thus giving you as precise estimate of a mean as possible.

Long Smith
  • 297
  • 1
  • 11