# Odometry

Odometry is the use of data from motion sensors to estimate change in position over time. Odometry is used by some robots, whether they be legged or wheeled, to estimate (not determine) their position relative to a starting location. This method is sensitive to errors due to the integration of velocity measurements over time to give position estimates. Rapid and accurate data collection, equipment calibration, and processing are required in most cases for odometry to be used effectively.

The word odometry is composed from the Greek words odos (meaning "travel", "journey", "route") and metron (meaning "measure").

## Simple Example

Suppose a robot has rotary encoders on its wheels or on its legged joints. It drives forward for some time and then would like to know how far it has traveled. It can measure how far the wheels have rotated, and if it knows the circumference of its wheels, compute the distance.

## 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.