Will pay for arduino code

I think a mechanical device is the simplest and most accurate way to make a follow-me cart. Think of a retractable dog leash but much lighter, with a rotary encoder and potentiometer will measure quite well direction and distance between cart and the person pulling it.