This paper describes adapting motion of a biped robot. In some cases that biped robots walk in human environment, the robots encounter non-flat surfaces. To adapt to such environment, it is necessary to get environmental information by sensors. In this paper, the environmental information is transformed into useful structure, defined as "environmental modes". The environmental modes consist of four modes; heaving, rolling, pitching, and twisting. By controlling biped robots, based on the environmental modes, they can adapt to non-flat surfaces. However, the environment with depressions is not considered in the conventional studies on controlling the environmental modes. Therefore, this research focuses on adapting motion to the depressed environment. A tip of the swing leg reached the bottom of depressions according to the heaving mode. The conventional study on controlling the environmental modes is introduced and extended in the proposed method. The experimental results showed the validity of the proposed method.