The Neuromechanicss of Soft-bodied Locomotion in Caterpillars and Robots