Gait analysis of a six-legged walking robot when a leg failure occurs