In a robot with two or more leg links having ankle joint respectively and
pivotably linked to a torso, the robot walks naturally by making the
ankle joint of a grounded leg link rotate freely by using passive
movement. A controller executes controlling operation of calculating
target joint angles of remaining joints other than the ankle joint of the
grounded leg link based upon the measured joint angles of the ankle joint
of the grounded leg link in the lateral and forward direction. The target
joint angles of the remaining joints are calculated so as to satisfy the
following condition that a tilting angle of the torso matches a target
tilting angle determined based upon the measured joint angle of the ankle
joint of the grounded leg link in the forward direction, a cycle period
of the idle leg link from lifting to grounding, and a target stride of
the idle leg link.