1. A walking robot, comprising: a plurality of legs each having a respective sole; and one or more sensors mounted on each of the soles to detect whether each of the soles is in contact with a ground during locomotion, the walking robot performing the locomotion according to a locomotion pattern composed of a plurality of locomotion cycles, and proceeding from a current locomotion cycle to a next locomotion cycle after determining whether the current locomotion cycle is stable using detection results of the sensors.