Obstacle avoidance

On this page 7

Obstacle avoidance is the navigation capability that lets a mobile robot detect objects in or near its path and change its motion in real time to prevent collisions, while still making progress toward its goal. In robotics navigation, it is the reactive, local layer that sits below global path planning: the planner chooses a route through the known map, and obstacle avoidance handles people, carts, doors and anything else the map did not contain.

The capability spans a spectrum from simple stop-and-wait behavior to methods that predict how moving obstacles will behave. Its quality decides whether a robot can operate smoothly in shared spaces or constantly halts, oscillates and blocks traffic.

How obstacle avoidance works in a navigation stack

Obstacle avoidance runs as a fast control loop, typically at 10 to 50 Hz, that turns current sensor data into a safe velocity command. Each cycle repeats the same three steps.

  1. Perceive: sensors such as 2D or 3D LiDAR, depth cameras, ultrasonic rangers or bumpers report nearby obstacles.
  2. Represent: detections are inserted into a local occupancy grid or costmap around the robot, often with obstacles inflated by the robot radius plus a safety margin.
  3. Decide and act: a local planner evaluates candidate motions against that representation and sends the best collision-free velocity to the motor controllers.

Obstacle avoidance depends on accurate localization, because the local representation must align with the global route, and it feeds back to path planning when the way is blocked long enough that a new global route is needed.

Main obstacle avoidance methods

Avoidance algorithms differ in how they model obstacles and how far ahead they look. Reactive methods are fast but short-sighted, while optimization-based methods look ahead at higher computational cost.

MethodCore ideaStrengthWeakness
Bug algorithmsFollow obstacle boundaries until the goal line is clearSimple, provably complete in 2DInefficient paths
Potential fieldsGoal attracts, obstacles repelSmooth and cheapLocal minima and oscillation in narrow passages
Vector field histogramChoose open sectors in a polar histogramRobust to sensor noiseLimited look-ahead
Dynamic window approachSimulate reachable velocities over a short horizonRespects acceleration limitsCan be trapped in U-shaped obstacles
Timed elastic bandOptimize a time-parameterized local trajectorySmooth, time-aware pathsHigher computation and tuning effort
Model predictive controlOptimize motions with explicit constraints and predictionsHandles dynamics and moving obstaclesNeeds a good model and solver
Common obstacle avoidance methods

Velocity-obstacle methods such as ORCA extend avoidance to moving agents by excluding velocities that would lead to a collision within a time horizon, which makes them popular for crowds and multi-robot fleets.

Key parameters and their trade-offs

Most avoidance behavior is controlled by a few parameters whose values reflect a trade-off between safety margin and mobility. Settings that feel safe in an open lab often make a robot unable to pass through real doorways.

ParameterTypical rangeEffect of increasing it
Inflation radiusRobot radius plus 0.05 to 0.5 mSafer clearance, but narrow passages close
Prediction horizon0.5 to 3 sEarlier reactions, more computation
Control frequency10 to 50 HzFaster response to sudden obstacles
Maximum speed0.3 to 2 m/s indoorsHigher throughput, longer stopping distance
Obstacle clearing timeout0.5 to 5 sFewer ghost obstacles removed too early
Tuning parameters in local obstacle avoidance

Stopping distance grows with the square of speed, so the sensor range and the processing latency must allow the robot to brake fully within the distance it can perceive. A slower robot with reliable sensing is often more productive than a fast one that stops constantly.

Obstacle avoidance is frequently confused with path planning and with safety functions. The distinction lies in scope, time scale and certification.

FunctionScopeTime scalePurpose
Global path planningWhole known mapSeconds to minutesFind an efficient route to the goal
Obstacle avoidanceA few meters around the robotTens of millisecondsMove safely along the route
Safety-rated stopProtective fields near the robotMillisecondsGuarantee a stop, certified hardware
Collision detectionContact or impactAfter contactLimit harm when avoidance fails
Avoidance and neighboring functions

For industrial mobile robots, safety-rated laser scanners and stop functions are separate from the navigation software and follow standards such as ISO 3691-4. Obstacle avoidance improves efficiency and comfort, but it is not a substitute for the certified safety layer.

Common problems and how to address them

Field problems in obstacle avoidance usually trace back to perception gaps or poorly matched parameters, not to the core algorithm.

  • Invisible obstacles: glass doors, table tops and overhangs escape a planar LiDAR; add depth cameras or 3D sensing.
  • Oscillation in corridors: opposing repulsive forces cause swaying; reduce gains or use trajectory optimization.
  • Freezing robot problem: dense crowds leave no safe motion; prediction and social navigation models help.
  • Ghost obstacles: stale costmap cells block paths; tune clearing and decay behavior.
  • Local minima traps: dead ends need recovery behaviors or replanning by the global planner.

A non-technical view

Obstacle avoidance is what keeps a robot from bumping into things. The robot already knows its general route, like a person following directions to a meeting room. Obstacle avoidance handles the surprises along the way, such as a person stepping out of an office or a cart left in the hallway.

The robot looks around many times per second, notices anything in its way and slows down, steers around it or waits. Good avoidance feels smooth and polite, while poor avoidance makes a robot stop and hesitate all the time.

A concrete example

A hospital uses autonomous delivery robots to carry medication carts between the pharmacy and the wards. Each robot has a planar safety LiDAR, two depth cameras facing forward and downward, and a local planner running at 20 Hz with a 2-second prediction horizon.

Corridors are busy with staff, beds and wheelchairs. The team sets a maximum speed of 1 m/s in corridors and 0.5 m/s near ward entrances, and an inflation margin of 0.15 m so the robot can still pass through standard doorways. The depth cameras catch the overhanging edges of beds that the planar scanner misses. The robots complete their routes with few blocked trips, and when a corridor stays blocked for more than 30 seconds, the global planner selects an alternative route through a parallel hallway.