How does fast slam creates grid maps?

I've implemented fast slam using landmark detection and the map stored is a feature map, made of landmarks positions. I would like to create a grid map, and my questions are about how does the robot create a grid map in slam:

1. Another landmark class is used, or the occupancy grid is the landmark itself? In other words, the grid map generation is made separatly of the feature map?

2. About the alignment of the map with the previous maps measures, this is similar to the fast slam 2.0 due to the fast that considers the robot pose and the measurement of t-1?

• Do you want to use a gridmap for improving the state estimate, or just as an output of your best estimate of your feature based SLAM? – Jakob Oct 31 '16 at 9:02
• I would like to leaen about the two ways, if possible – Ricardo Achilles Oct 31 '16 at 22:30

Grid based FastSlam relies on the same principle that Landmakr based FastSlam. The difference is that we are not working with each grid cell as a landmark, but the whole gridmap itself.

For Grid based FastSlam, each particle updates its own grid-map using the data from the range sensor (Lidar, UltraSound, etc.) and its odometry. This is called "Mapping with known poses", which is an easy problem (basically update the probability of a grid cell being occupied based on the data from the range sensor and the odometry, supposing the odometry data is totally correct). Then, and here is where the FastSlam algorithm plays its role, we compute the weight of each particle based on its own grid-map and the new measurements. With all the particles weighted, we then can do resampling. In fact, resampling will be only practical after loop-closings, since it is only when we can compare new data with our previously computed grid-maps. After that, we will keep only particles whose map was closer to reality, since the weight of that particles after resampling on loop-closings will be higher.

The steps would be similar to Landmark based Fastslam:

1. Get Data from sensors
2. Estimate motion based on odometry measurements
3. Estimate grid-map based on range measurements
4. Compute Weight based on range measurements and grid-map
5. Resample.

The difference between FastSlam and FastSlam2.0 is that in the motion estimation we will use also the range measurements to get a better estimate of the robot position after the movement (typically using scan-matching with Iterative Closest Points algorithms).

1. Get Data from sensors
2. Estimate motion based on odometry and range measurements
3. Estimate grid-map based on range measurements
4. Compute Weight based on range measurements and grid-map
5. Resample.

I believe using a grid map will only decrease the accuracy of you estimates. I am assuming your feature map is basically a vector containing the position of each feature as real values. If you convert you feature to a grid map (occupancy grid), then you will be shifting every feature into a grid cell. This will result in a loss of resolution because the grid cells are discrete. To generate an occupancy grid, you need to first choose a resolution. So, let each cell represent a 1 meter by 1 meter area, and then you can simply assign a 1 to any cell containing a landmark and assign a 0 to any cell not containing a landmark.