Is there a sensor which, when placed very close to a textured surface, can tell me the distance travelled? Just like what’s happening in an optical mouse. It seems that Sparkfun once carried a chip of this kind, though not an Arduino-ready sensor board.
We don’t currently carry anything similar/equivalent that I’m aware of, but maybe you can right something up with a small set of wheels and encoders? https://www.sparkfun.com/products/13260 You could use them in reverse (measured voltage generated by the movement) and create a function for linear distance traveled in code