toolbuddy / 2D-Grid-SLAM

A simple python implement of feature-based monocular SLAM system.
GNU General Public License v3.0
29 stars 8 forks source link

are you doing scan-matching? #3

Open Sollimann opened 3 years ago

Sollimann commented 3 years ago

First of all, great project you have here :) I'm assuming you have based your implementation on the paper Improved Techniques for Grid Mapping With Rao-Blackwellized Particle Filters, is that correct? When reading through your code I couldn't identify which part of the code that was doing scan-matching. Is it included in the implementation, if so, which part of the code is this? The only possible candidate I found was this.

image

It seems to me that this part of the corresponds to step 3 and 4 in the algorithm in the paper, meaning that you first do a sampling step, then you compute an improved proposal distribution and then you update importance weights. It also looks like you're skipping the scan-matching, is that correct? Also, you have commented out the resampling, why is that?

image

Sorry for all the questions, I'm just curious on your implementation :) I tried to run your code, and it works great, so kudos for that!

jerrywiston commented 3 years ago

I appreciate that you like my project. My work is basically based on the paper "Improved Techniques for Grid Mapping With Rao-Blackwellized Particle Filters", while I only implement the original version of RBPF that adopt the motion model as the proposal distribution: image. The term "p(z|x,m)" corresponds to the likelihood field computation in my code.

The algorithm with scan matching is based on the later equation of the paper: image. You have to apply the scan matching algorithm such as ICP or HectorSLAM to compute the related pose between two timesteps as the mean of the Gaussian assumption (p(z|x)), and then use it to sample the particle in the meaningful regions.

Besides, I commented the resampling process because I have moved it outside (you can see it in "test.py").

Sollimann commented 3 years ago

Thank you for the thorough answer :) When you say, "while I only implement the original version of RBPF that adopt the motion model as the proposal distribution"?. Does this original implementation lack scan-matching? :thinking: I still don't understand if you have implemented the scan matching or not, at least I'm unable to identify anything resembles an ICP or HectorSLAM algorithm in your code.

jerrywiston commented 3 years ago

I only utilize motion model as the proposal distribution and do not apply the scan matching. And if you want to implement scan matching, you have to refer to that equation.