A motion equation with a boundary condition regarding a future
center-of-gravity horizontal trajectory of a robot is solved so that the
moment around a horizontal axis at a point within a support polygon is
zero when the robot is in contact with a floor or so that horizontal
translational force is zero when the robot is not in contact with the
floor and so that connection is made to a current horizontal position and
speed of the center of gravity. In addition, a motion equation with a
boundary condition regarding a future center-of-gravity vertical
trajectory of the robot is solved so that vertical translational force
acting upon the robot other than gravity is zero when the robot is not in
contact with the floor and so that connection is made to a current
vertical position and speed of the center of gravity. A motion state of a
next time is determined so that, when the robot is not in contact with
the floor, the moment around the center of gravity is zero, and the
determined center-of-gravity position is achieved. Therefore, a stable
motion pattern which allows transition between a floor contact period and
a floor non-contact period is generated in real time.