next up previous contents
Next: 7.46 waveaudio Up: 7. Device Drivers Previous: 7.44 upcbarcode   Contents


7.45 vfh


Chris Jones cvjones(at)


The VFH driver implements the Vector Field Histogram Plus local navigation method by Ulrich and Borenstein [7]. VFH+ provides real-time obstacle avoidance and path following capabilities for fast mobile robots.


Supported interfaces:

Required devices:

Supported configuration requests:

Configuration file options

Name Type Default Meaning
position_index integer 0 Index of the underlying position device.
laser_index integer 0 Index of the laser device.
cell_size length 0.1 Local occupancy map grid size (m).
window_diameter integer 61 Dimensions of occupancy map (map consists of window_diameter X window_diameter cells).
sector_angle integer 5 Histogram angular resolution, in degrees.
robot_radius length 0.25 The radius of the robot (m).
safety_dist length 0.1 The minimum distance the robot is allowed to get to obstacles (m).
max_speed integer 200 The maximum allowable speed of the robot, in millimeters/second, the robot.
max_turnrate integer 40 The maximum allowable turnrate of the robot.
free_space_cutoff float 2000000.0 Unitless value. The higher the value, the closer the robot will get to obstacles before avoiding.
weight_desired_dir float 5.0 Bias for the robot to turn to move toward goal position.
weight_current_dir float 3.0 Bias for the robot to continue moving in current direction of travel.
distance_epsilon length 0.5 Planar distance from the target position that will be considered acceptable.
angle_epsilon angle 10 degrees Angular difference from target angle that will considered acceptable.


The primary parameters to tweak to get reliable performance are safety_dist and free_space_cutoff. In general, safety_dist determines how close the robot will come to an obstacle while turning (around a corner for instance) and free_space_cutoff determines how close a robot will get to an obstacle in the direction of motion before turning to avoid. From experience, it is recommeded that max_turnrate should be at least 15% of max_speed.

To get initiated to VFH, I recommend setting robot_radius to the radius of your robot and starting with the default values for other parameters and experimentally adjusting safety_dist and free_space_cutoff to get a feeling for how the parameters affect performance. Once comfortable, increase max_speed and max_turnrate. Unless you are familiar with the VFH algorithm, I don't recommend deviating from the default values for cell_size, window_diameter, or sector_angle.

For more information on the VFH driver, ask Chris Jones:

next up previous contents
Next: 7.46 waveaudio Up: 7. Device Drivers Previous: 7.44 upcbarcode   Contents