Analysis of the wave and tripod gaits of a six-legged walking robot