Main Content

show

DisplayVectorFieldHistograminformation in figure window

Description

example

show(vfh)shows histograms calculated by the VFH+ algorithm in a figure window. The figure also includes the parameters of thecontrollerVFHobject and range values from the last object call.

show(vfh,'Parent',)sets the specified axes handle,, to the axes.

h= show(___)returns the figure object handle created byshowusing any of the arguments from the previous syntaxes.

Examples

collapse all

This example shows how to calculate a steering direction based on input laser scan data.

创建一个controllerVFHobject. Set theUseLidarScanproperty totrue.

vfh = controllerVFH; vfh.UseLidarScan = true;

Input laser scan data and target direction.

ranges = 10*ones(1,500); ranges(1,225:275) = 1.0; angles = linspace(-pi,pi,500); targetDir = 0;

创建一个lidarScanobject by specifying the ranges and angles.

scan = lidarScan(ranges,angles);

Compute an obstacle-free steering direction.

steeringDir = vfh(scan,targetDir);

Visualize theVectorFieldHistogramcomputation.

h = figure; set(h,'Position',[50 50 800 400]) show(vfh)

Input Arguments

collapse all

Vector field histogram algorithm, specified as acontrollerVFHobject. This object contains all the parameters for tuning the VFH+ algorithm.

Axes properties, specified as a handle.

Output Arguments

collapse all

Axes handles for VFH algorithm display, specified as anAxesarray. The VFH histogram andHistogramThresholdsare shown in the first axes. The binary histogram, range sensor readings, target direction, and steering directions are shown in the second axes.

Version History

Introduced in R2019b

See Also