A drone avoids obstacles by sensing what is around it, estimating where objects are, and changing its flight path before a collision happens. This matters because drones often fly near trees, walls, people, wires, and the ground. Safe obstacle avoidance helps camera drones, delivery drones, rescue drones, and racing drones move through real environments.
The basic idea is to turn sensor data into a decision about speed, direction, and height.
Understanding How Drones Avoid Obstacles
A camera does not directly measure distance in the same way as a ruler. Its image is a flat pattern of pixels, so the drone must infer depth. One method tracks a feature such as a corner of a window or a branch across consecutive frames.
Nearby features appear to move across the image faster than distant features when the drone moves. Two cameras spaced apart can do better. Their views of the same object differ slightly, and that difference can be used to estimate depth.
Cameras work well for textured surfaces in good light. They struggle with darkness, glare, fog, plain walls, and fast motion that blurs the image. Thin wires are especially difficult because they may occupy only a few pixels.
Ultrasonic sensors send out short pulses of high frequency sound. A receiver listens for the returning echo. Since sound has a known speed in air, the flight computer can estimate how far away a surface is from the travel time of the pulse.
These sensors are useful near the ground for landing and indoor hovering. Their readings have limits. Soft materials such as curtains can absorb sound.
Angled or narrow objects can reflect sound away from the receiver. Wind, temperature, and other sound sources can affect measurements. An ultrasonic sensor sees a cone-shaped region rather than a single point, so it may detect a wall without showing its exact edges.
Reliable drones combine several sources of information. This is called sensor fusion. An inertial measurement unit measures acceleration and rotation.
A satellite navigation receiver gives outdoor position estimates. Cameras and range sensors describe nearby space. Each source has errors, but together they give a more dependable estimate of the drone's location and motion.
The computer builds a local map with regions that seem free, occupied, or unknown. Unknown space should be treated carefully. The map is updated many times each second because a drone can travel a noticeable distance in a short time.
Path planning is linked to control. First, the planner selects a safe direction or a short route through clear space. Then the flight controller changes motor speeds to tilt, slow down, climb, or turn.
It must respect the drone's turning ability and braking ability. A route that looks clear on a map may still be unsafe if the drone cannot slow down before reaching it. Good systems keep extra space around objects because sensor readings are never perfect.
Students should pay attention to delay, uncertainty, and moving objects. A pedestrian, another drone, or a swinging branch can change the safe route before the next camera frame arrives. Many drones respond by reducing speed, stopping, or landing when their sensor data is unclear.
Key Facts
- Distance from speed and time: d = vt
- Stopping distance depends on reaction time and braking: d_stop = v t_react + v^2/(2a)
- Ultrasonic sensors estimate distance using sound echoes: d = vt/2
- A camera can help detect obstacles by comparing how objects move between video frames.
- A drone avoids an object by choosing a new path that keeps a safety margin around it.
- Hovering means holding position, while obstacle avoidance while moving requires predicting where the drone and obstacle will be soon.
Vocabulary
- Sensor
- A sensor is a device that measures information from the environment, such as distance, light, motion, or sound.
- Ultrasonic sensor
- An ultrasonic sensor measures distance by sending out high frequency sound waves and timing how long the echo takes to return.
- Obstacle avoidance
- Obstacle avoidance is the process of detecting objects and changing motion to prevent a collision.
- Flight path
- A flight path is the route a drone follows through the air from one position to another.
- Hover
- To hover means to stay nearly still in the air by balancing lift, weight, and small corrections.
Common Mistakes to Avoid
- Assuming one sensor sees everything, because cameras, ultrasonic sensors, and other sensors each have blind spots and limits.
- Forgetting that detection takes time, because a fast drone may travel a significant distance before it finishes sensing, computing, and turning.
- Treating hovering and moving avoidance as the same task, because a moving drone must predict future positions while a hovering drone mainly holds one location.
- Ignoring the safety margin, because avoiding only the exact edge of an obstacle can still cause a crash due to wind, sensor error, or turning limits.
Practice Questions
- 1 A drone flies at 4 m/s and its obstacle system takes 0.5 s to detect and begin avoiding a wall. How far does the drone travel during that time?
- 2 An ultrasonic sensor sends a sound pulse that returns after 0.020 s. If the speed of sound is 340 m/s, how far away is the obstacle?
- 3 A drone has a front camera and a downward camera. Explain why it might still need to slow down when flying toward a tree in dim light.