Detecting track has finished

That will not be possible as the track can have something similar as the attached image AND the robot will be around 30cm and the track is 1m width with 15m length