Odometry - More Sophisticated Example

More Sophisticated Example

Suppose that a simple robot has two wheels which can both move forward or reverse and that they are positioned parallel to one another, and equidistant from the center of the robot. Further, assume that each motor has a rotary encoder, and so we can determine if either wheel has traveled one "unit" forward or reverse along the floor. This unit is the ratio of the circumference of the wheel to the resolution of the encoder.

If the left wheel were to move forward one unit while the right wheel remained stationary, then the right wheel acts as a pivot, and the left wheel traces a circular arc in the clockwise direction. Since our unit of distance is usually quite small, we can approximate by assuming that this arc is a line. Thus, the original position of the left wheel, the final position of the left wheel, and the position of the right wheel form a triangle, which we'll call A.

Also, the original position of the center, the final position of the center, and the position of the right wheel form a triangle which we will call B. Since the center of the robot is equidistant to either wheel, and as they share the angle formed at the right wheel, triangles A and B are similar triangles. In this situation, the magnitude of the change of position of the center of the robot is one half of a unit. The angle of this change can be determined using the law of sines.

Read more about this topic:  Odometry