# 2 – 03 Graph SLAM Quiz V2

Let me take you about my favorite methods of all called Graph SLAM. This is one of many methods for SLAM, and this abundance by far the easiest to explain. Let’s assume we have a robot, and it’s called arbitrarily the initial location, x equals zero and y equals zero. For this example, we just assume the board has a perfect compass, and we don’t care about heading direction just to keep things simple. Let’s assume the robot moves to the right in x direction by 10. So, it’s now over here. In a perfect world, you would know that x1, the location after motion is the same as x0 plus 10, and y1 is the same as y0. But we learned from our various robotic common fiddle lessons and others that the location is actually uncertain. So, rather than assuming in our X-Y coordinate system the robot moved to the right by 10 exactly, we know that the actual location is a Gaussian centered around 10, 0, but it’s possible that over to somewhere else. Remember, we worked out the math for this Gaussian. Here’s how it looks like just for the x variable. Rather than setting x1 to x0 plus 10, we tried to express the Gaussian that peaks when these two things are the same. So, if you subtract from x1, x0, and 10, put this into a square format, and turn this into a Gaussian, we get a probability distribution that relates x1 and x0. We can do the same for y. Since there is no change in y according to our motion, all the assets that y1 and y0 are as close together as possible. The product of these two Gaussians is now our constraint. We wish to maximize the likelihood of the position x1 given that the position x0 is zero, zero. So, with what Graph SLAM does is defining our probabilities using a sequence of such constraints. Say we have a robot that moves in some space, and each location is now characterized by a vector x0 and a vector x1, vector x2, vector x3. Often, they’re three-dimensional vectors, then we’ll graph some collects is initial location, which is a zero, zero, zero usually. Over here, it looks a little bit different. Then, really importantly, the lots of relative constraints that relate each robot pose to the previous world pose. We call them relative motion constraints. You can think of those as rubber bands. In expectation, this rubber band will be exactly the motion the robot sensed or commanded. But in reality, it might have to bend a little bit to make the map more consistent. Speaking about maps, there’s huge landmarks as an example. So, suppose there’s a landmark out here, and the landmark is being seen from the robot with some relative measurement, zero, z1. Perhaps it didn’t even see it to attempt two, but this is z3. All these are also relative constraints, very much like the ones before. Again, they capture by Gaussians, and we get relative measurement constraints. One such constraint every time the robot sees a landmark. So, Graph SLAM collects those constraints. As we’ll see, they’re insanely easy to collect, and it just relax this the set of rubber bands to find the most likely configuration of robot path along with the location of landmarks, and that is the mapping process. Let me ask you a quick quiz. It will take some thinking. Suppose we have six robot poses. That is one initial, and five motions, and we have eight measurements of landmarks that we’ve seen. These might be multiple landmarks, some doesn’t move it, so more than one. The question now is, how many total constraints do we have if we count each of this constraint for exactly one constraint?