Dynamics of a quadruped in walking, running and gait transition.