Photographer Dirk Nienaber watched a a group of processionary caterpillars make their way across Perth, Australia. They don’t go this fast; it’s a time-lapse video. These are probably Ochrogaster lunifer, or the bag-shelter moth. They exude a silk trail as they walk, and other caterpillars of the same species will follow that trail -and leave one of their own as they do.
There are quite a few species of processionary caterpillars. I found an experiment in which pine processionary caterpillars were induced to walk in a circle.
Fabre conducted a famous study on the processionary pine larvae where a group of them were attached nose-to-tail in a circle with food just outside the circle; they continued marching in the circle for a week; he described the experiment in his 1916 book The Life of the Caterpillar.