The stable movement for a robot that supports fishery works and ocean development on a ship board and floating platforms has been studied. Because there are many obstacles preventing the movement on the path in ship, the multi-legged system is advantageous for the purpose. In this paper, attitude control method of four-legged robot to maintain stable walk on the ground swayed by wave motion has been simulated. The algorithms for the walk, in which the control variables such as inclination of robot body, position of center of gravity, angular acceleration of body are took into account, has been compared. The results showed that control by center of gravity gave effective movement, and more good control performance had been obtained by using multi variables control system.