Another sensor that we used came from
www.digi-key.com and was a 4-bit rotary encoder. it works, for the most part, the way the optical rotation sensors worked as previously stated^. anyway, we put one RE on an axle of one side, and one on the other. (We used a tank-style drive system) these 2 encoders were used in correlation with the yaw-rate sensor to triangulate the position of the robot. (Our programmer is a senior and in 200 level math and a EE class at Purdue) The only problem with the REs is that if a wheel slips then your calculation is off. There are 6 pin-outs on the encoder and are connected to the analog port on the RC.