Compared with wheeled robots and tracked robots, legged robots have higher flexibility and environmental adaptability, it can perform tasks better in complex environments. In this article, the SDUQuad-48 quadruped robot, developed by Shandong University, equipped with a depth camera to realize the perception of environmental terrain. We build a terrain height map based on the point cloud data, and use an algorithm based on the potential field to determine a terrain passability plan. Each cell in the terrain passability map is set to a specific state based on the movement of the robot to provide the selection of foothold for the robot’s subsequent motion plan. Synthesize locomotion and depth vision realize the robot’s perception and adaptation to the environmental terrain automatically. In the experimental part of this article, it is shown that our SDUQuad-48 quadruped robot can successfully cross obstacles of different heights vary from 4 to 7 cm with a steady speed of 0.2 m/s.