A two-wheeled inverted robot includes a body, two wheels coaxially
arranged on the body, a drive device for driving each of the wheels, a
first state detector for detecting at least one of an inclination angle
and an inclination angular speed of the body, a second state detector for
detecting at least one of a rotation angle and a rotational angular speed
of the wheel, a body constraint recognizing device for detecting whether
or not body rotation is constrained, and a controller for determining a
command value to the drive device. Based on the detection result by the
body constraint recognizing device, the controller determines the command
value for changing a ratio of a torque contributing to the body rotation.