Guiding machines along a predetermined path