First, the principle of ultrasonic sensor ranging is simple, and the hardware is easy to realize. Compared with other ranging methods, it has the advantages of lower cost and easier use. Second, ultrasonic sensor is not affected by lighting conditions and object color, and can detect transparent obstacles that cannot be detected by optical sensor. Third, when ultrasonic sensor transmits ultrasonic, the ultrasonic wave is transmitted in a certain range of space, which can expand the detection range. It can make up for the limitation of single direction detection such as laser sensor when avoiding obstacles and collision.