Collaboration diagram for wavefront:

The wavefront driver implements a global path planner for a planar mobile robot.

This driver works in the following way: upon receiving a new planner target, a path is planned from the robot's current pose, as reported by the underlying localize device. The waypoints in this path are handed down, in sequence, to the underlying position2d device, which should be capable of local navigation (the vfh driver is a great candidate). By tying everything together in this way, this driver offers the mythical "global goto" for your robot.

The planner first creates a configuration space of grid cells from the map that is given, treating both occupied and unknown cells as occupied. The planner assigns a cost to each of the free cells based on their distance to the nearest obstacle. The nearer the obstacle, the higher the cost. Beyond the max_radius given by the user, the cost in the c-space cells is zero.

When the planner is given a new goal, it finds a path by working its way outwards from the goal cell, assigning plan costs to the cells as it expands (like a wavefront expanding outwards in water). The plan cost in each cell is dependant on its distance from the goal, as well as the obstacle cost assigned in the configuration space step. Once the plan costs for all the cells have been evaluated, the robot can simply follow the gradient of each lowest adjacent cell all the way to the goal.

In order to function effectively with an underlying obstacle avoidance algorithm, such as Vector Field Histogram (the vfh driver), the planner only hands off waypoints, not the entire path. The wavefront planner finds the longest straight-line distances that don't cross obstacles between cells that are on the path. The endpoints of these straight lines become sequential goal locations for the underlying device driving the robot.

For help in using this driver, try the playernav utility.

Compile-time dependencies


This driver controls two named position2d devices: one for input and one for output. That way you can read poses from a localization or SLAM system and send commands directly to the robot. The input and output devices may be the same.

Configuration requests

Configuration file options
Note that the various thresholds should be set to GREATER than the underlying position device; otherwise the planner could wait indefinitely for the position device to achieve a target, when the position device thinks it has already achieved it.

This example shows how to use the wavefront driver to plan and execute paths on a laser-equipped Pioneer.

  name "p2os"
  provides ["odometry:::position2d:0"]
  port "/dev/ttyS0"
  name "sicklms200"
  provides ["laser:0"]
  port "/dev/ttyS1"
  name "mapfile"
  provides ["map:0"]
  filename "mymap.pgm"
  resolution 0.1
  name "amcl"
  provides ["position2d:2"]
  requires ["odometry:::position2d:1" "laser:0" "laser:::map:0"]
  name "vfh"
  provides ["position2d:1"]
  requires ["position2d:0" "laser:0"]
  safety_dist 0.1
  distance_epsilon 0.3
  angle_epsilon 5
  name "wavefront"
  provides ["planner:0"]
  requires ["output:::position2d:1" "input:::position2d:2" "map:0"]
  safety_dist 0.15
  distance_epsilon 0.5
  angle_epsilon 10

Brian Gerkey, Andrew Howard

Last updated 12 September 2005 21:38:45