Here we have an example.
And, what the robot is actually going to do,
is it's going to follow this purple line.
Okay? So this is where it starts and
then it goes here, and it moves that way.
What we're showing you to begin with is a couple of things.
First of all, you see all those red dots?
That's its current set of particles.
In other words, it has no idea where it actually is.
The green is an example of where it thinks it might be,
in fact, this is the locally most likely.
Which is just some way of the robot guessing where it is.
Now, what I'm not showing on this map is the, for
each particle there's also a theta, right?
Particles have to represent the state.
What do we say our state was?
We said it was x, y, and theta.
It's hard to show this in three, so I'm only showing x and y, all right?
But, for any given theta that I think it is,
then I would be sending out a ray of sensor measurements.
And I think I know where it should hit because why?
Because I have a complete map.
Okay?
So what happens is, first, you're going to,
your eye's just going to naturally go to the green thing.
What's going on there is that's the set of sensor
measurements that it's getting.
Though, so wherever, wherever it thinks it is,
it puts down the measurements it actually got.
Now, if it's in the right place, those measurements will actually,
most of the time, hit the wall at the right distance.
Every now and then it'll go right through the wall because it was a no
return, all right?
So let me just put it in motion.
It's easier to, to understand.
All right, so here we go, so it's a movie.
So each one of these changes,
is when it thinks it is when it takes a measurement.
And you'll notice, there's a clump of particles here, in
fact that's the most likely clump, and there's also a clump of particles there.
That's a nice way of saying the robot does not know
whether it's definitely here or definitely there.
And the reason for that is the hallway's kind of symmetric, right?
There are these doors, okay, but there's doors on both sides.
So it hasn't, yet been able to disambiguate.
If this is the center of my universe, whether it's at this area or that area.
But let me put it back in motion.
What's going to happen is the robot's going to go inside, in the room.
And you'll notice in this room, in the room it's about to go into,
there's a ottoman or whatever that is in the middle that's not in the other room.
So when it, once it goes in, yep.
There it goes.
Okay?
You'll notice the particles that are in the wrong place,
they're going to disappear.
Okay.
Now some of the rays are still going in the wrong direction because, they're,
they're going through the walls, but that's just the no return.
And you'll notice that, by the time we get to the end of the run,
you'll notice that it has localized itself very well.
Some of the measurements still go through the walls because
I'm assuming those were no returns.
But, just by taking these simple one-dimensional measurements,
several of them at a time, and knowing the map and
taking its movements, it's able to localize exactly where it is.
And that's sort of a hallmark of particle filtering.
You start off with a big unknown set, and
eventually a whole bunch of particles go away because
they're just totally inconsistent with the measurements you get.
So when they get multiplied by p of z given x,
the likelihood of that measurement is so small that it diminishes that
particles weight a lot, and the next time you sample, let me say this again,
remember very low weight particles sometimes don't get sampled at all.
So what happens is only the samples that are near the parts of the sensor
measurements that are consistent survive and you ke, you keep iterating.
Also remember we had the two lumps for
awhile there because it wasn't sure whether it was this one or that one.
Because it didn't have enough information to know yet.
It wasn't until it went inside that room that it had that information.
And this is sort of the inherent advantage of particle filtering over
say, a Kalman filter that has a single hypothesis.
For those of you who have maybe heard of multi-hypothesis tracking where you,
where you end up having multiple hypothesis.
One way of thinking a particle filter is, is,
it gives me just a uniform and easy way of doing multiple hypothesis tracking.