This paper presents the implementation of impedance control for a hydraulically driven hexapod robot named COMET-IV, which can walk on uneven and extremely soft terrain. To achieve the dynamic behavior of the hexapod robot, changes in center of mass and body attitude must be taken into consideration during the walking periods. Indirect force control via impedance control is used to address these issues. Two different impedance control schemes are developed and implemented: single-leg impedance control and center of massbased impedance control. In the case of single-leg impedance control, we derive the necessary impedance and adjust parameters (mass, damping, and stiffness) according to the robot legs' configuration. For center of massbased impedance control, we use the sum of the forces of the support legs as a control input (represented by the body's current center of mass) for the derived impedance control and adjust parameters based on the robot body's configuration. The virtual forces from the robot body's moment of inertia are adapted to achieve optimal control via a linear quadratic regulator method for the proposed indirect attitude control. In addition, a compliant switching mechanism is designed to ensure that the implementation of the controller is applicable to the tripod sequences of force-based walking modules. Evaluation and verification tests were conducted in the laboratory and the actual field with uneven terrain and extremely soft surfaces. C 2011 Wiley Periodicals, Inc.