Ah that makes more sense. I would recommend some type of ultrasonic Distance Sensor or perhaps an IR Distance sensor. Either one of them you can program so when the distance becomes too great, to stop and go another direction. GPS might work but depending on the connection, the distance can be off by a few meters.

http://www.amazon.com/SunFounder-Ult...asonic+arduino

http://www.amazon.com/GP2Y0A21YK0F-S...istance+sensor