A method of planning crab gaits for a quadruped walking robot is propo
sed. In the conventional gait study, one of the major concerns has bee
n the foothold selection based on a prescribed body motion, but, in th
e paper, we consider the body motion planning problem under the assump
tion that a set of irregular footholds is given, and propose a hierarc
hical strategy. The strategy can be divided into three stages: first,
a feasible range of the body movement is sought under the kinematic li
mit and the stability constraint. Next, a swing-leg sequence is select
ed with the aid of a proposed measure of traversability. Finally, an o
ptimal sequence of the body motion is planned by the proposed procedur
e of otpimizing the gait stability margin. To verify the efficiency of
the proposed method, simulation results are presented.