Vector Field Histogram local navigation algorithm. More...
Vector Field Histogram local navigation algorithm.
- Note:
- This driver may take several seconds to start up, especially on slower machines. You may want to set the 'alwayson' option for vfh to '1' in your configuration file in order to front-load this delay. Otherwise, your client may experience a timeout in trying to subscribe to this device.
The vfh driver implements the Vector Field Histogram Plus local navigation method by Ulrich and Borenstein. VFH+ provides real-time obstacle avoidance and path following capabilities for mobile robots. Layered on top of a laser-equipped robot, vfh works great as a local navigation system (for global navigation, you can layer the wavefront driver on top of vfh).
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 starting with the default values for all 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.
- Compile-time dependencies
- none
- Provides
- position2d : accepts target poses, to which vfh will attempt to drive the robot. Also passes through the data from the underlying position2d device. All data and commands are in the odometric frame of the underlying device.
- planner : similar to above, but uses the planer interface which allows extras such as "done" when arrived.
- Requires
- position2d : the underlying robot that will be controlled by vfh.
- Exactly one of:
-
- Todo:
- : add support for getting the robot's true global pose via the simulation interface
- Configuration requests
- all position2d requests (as long as the underlying position2d device supports them)
- Supported commands
- PLAYER_POSITION2D_CMD_POS : Position control. This is the normal way to use vfh. Velocity commands will be sent to the underlying position2d device to drive it toward the given pose.
- PLAYER_POSITION2D_CMD_VEL : Velocity control. Position control is disabled and the velocities are passed directly through to the underlyin position2d device.
- Configuration file options
- cell_size (length)
- Default: 0.1 m
- Local occupancy map grid size
- window_diameter (integer)
- Default: 61
- Dimensions of occupancy map (map consists of window_diameter X window_diameter cells).
- sector_angle (integer)
- Default: 5
- Histogram angular resolution, in degrees.
- safety_dist_0ms (length)
- Default: 0.1 m
- The minimum distance the robot is allowed to get to obstacles when stopped.
- safety_dist_1ms (length)
- Default: safety_dist_0ms
- The minimum distance the robot is allowed to get to obstacles when travelling at 1 m/s.
- max_speed (length / sec)
- Default: 0.2 m/sec
- The maximum allowable speed of the robot.
- max_speed_narrow_opening (length / sec)
- Default: max_speed
- The maximum allowable speed of the robot through a narrow opening
- max_speed_wide_opening (length / sec)
- Default: max_speed
- The maximum allowable speed of the robot through a wide opening
- max_acceleration (length / sec / sec)
- Default: 0.2 m/sec/sec
- The maximum allowable acceleration of the robot.
- min_turnrate (angle / sec)
- Default: 10 deg/sec
- The minimum allowable turnrate of the robot.
- max_turnrate_0ms (angle / sec)
- Default: 40 deg/sec
- The maximum allowable turnrate of the robot when stopped.
- max_turnrate_1ms (angle / sec)
- Default: max_turnrate_0ms
- The maximum allowable turnrate of the robot when travelling 1 m/s.
- min_turn_radius_safety_factor (float)
- Default: 1.0
- ?
- free_space_cutoff_0ms (float)
- Default: 2000000.0
- Unitless value. The higher the value, the closer the robot will get to obstacles before avoiding (while stopped).
- free_space_cutoff_1ms (float)
- Default: free_space_cutoff_0ms
- Unitless value. The higher the value, the closer the robot will get to obstacles before avoiding (while travelling at 1 m/s).
- obs_cutoff_0ms (float)
- Default: free_space_cutoff_0ms
- ???
- obs_cutoff_1ms (float)
- Default: free_space_cutoff_1ms
- ???
- weight_desired_dir (float)
- Default: 5.0
- Bias for the robot to turn to move toward goal position.
- weight_current_dir (float)
- Default: 3.0
- Bias for the robot to continue moving in current direction of travel.
- distance_epsilon (length)
- Default: 0.5 m
- Planar distance from the target position that will be considered acceptable.
- angle_epsilon (angle)
- Default: 10 deg
- Angular difference from target angle that will considered acceptable.
- Stall escape options. If the underlying position2d device reports a stall, this driver can attempt a blind escape procedure. It does so by driving forward or backward while turning for a fixed amount of time. If the escape fails (i.e., the stall is still in effect), then it will try again.
- escape_speed (length / sec)
- Default: 0.0
- If non-zero, the translational velocity that will be used while trying to escape.
- escape_time (float)
- Default: 0.0
- If non-zero, the time (in seconds) for which an escape attempt will be made.
- escape_max_turnrate (angle / sec)
- Default: 0.0
- If non-zero, the maximum angular velocity that will be used when trying to escape.
- synchronous (int)
- default: 0
- If zero (the default), VFH runs in its own thread. If non-zero, VFH runs in the main Player thread, which will make the server less responsive, but prevent nasty asynchronous behaviour under high CPU load. This is probably only useful when running demanding simulations.
- escape_speed (length / sec)
- Example
driver ( name "p2os" provides ["odometry::position:1"] port "/dev/ttyS0" ) driver ( name "sicklms200" provides ["laser:0"] port "/dev/ttyS1" ) driver ( name "vfh" requires ["position:1" "laser:0"] provides ["position:0"] safety_dist 0.10 distance_epsilon 0.3 angle_epsilon 5 )