Lesson 14 Automatic Obstacle Avoidance Function
In this lesson, we will learn how to use PiCarPro to achieve automatic obstacle
avoidance.
14.1 Introduction to Automatic Obstacle Avoidance
Since the camera used by our Raspberry Pi robot is a monocular camera and
cannot collect depth information, many of our robot products use ultrasonic ranging
modules to obtain depth information and detect whether there are obstacles in a
certain direction to get the distance of the obstacle.
The principle of distance detection by ultrasonic ranging sensor: the method of
detecting distance by ultrasonic is called echo detection method, that is, the ultrasonic
transmitter emits ultrasonic waves in a certain direction, and the timer starts timing at
the same time as the launch time. The ultrasonic waves propagate in the air and
encounter obstacles on the way. When the object surface (object) is blocked, it will be
reflected back immediately, and the ultrasonic receiver will immediately stop timing
when the reflected ultrasonic wave is received. The propagation speed of ultrasonic
waves in the air is 340m/s. According to the time t recorded by the timer, the distance
s from the launch point to the obstacle surface can be calculated, namely: s=340t/2.
Using this principle of ultrasound, the ultrasonic ranging module is widely used in
practical applications, such as car reversing radar, unmanned aerial vehicle, and smart
car.
168
Need help?
Do you have a question about the PiCar-Pro and is the answer not in the manual?