Quattro's legs need to start at their "initial position". To do this run the servo motors with this program and then set the legs to their correct positions.
This code is with the added on obstacle avoiding feature. Quattro with the ultrasonic sensor will navigate in an environment without knocking into objects.