A technique is presented for allowing a legged robot to walk with leg links (in particular legs contacting the ground) extended naturally. The legged robot comprises a torso and a plurality of leg links. A base end of each leg link is swingably connected to the torso and a tip end thereof is provided with a sole. The robot comprises a gait data modifying means that modifies prepared gait data on the basis of an actual walking state, an identifying means that identifies a position of the base end for each of the leg links on the basis of a target position of the torso described in the modified gait data, a displacement amount calculating means that calculates, for each leg link, a vertical displacement amount such that, when the identified position of the base end is vertically displaced by the vertical displacement amount, a distance between the displaced position of the base end and a target position of the sole described in the modified gait data becomes equal to a predetermined distance, a selecting means that selects a maximum vertically downward displacement amount from the vertical displacement amounts calculated for the leg links, and a target position modifying means that modifies the target position of the torso described in the modified gait data in the vertical direction by the vertical displacement amount selected by the selecting means.
展开▼