controllerPurePursuit
Create controller to follow set of waypoints
Description
The controllerPurePursuit
System object™ creates a controller object used to make a differential-drive vehicle follow a
set of waypoints. The object computes the linear and angular velocities for the vehicle given
the current pose. Successive calls to the object with updated poses provide updated velocity
commands for the vehicle. Use the MaxAngularVelocity
and
DesiredLinearVelocity
properties to update the velocities based on the
vehicle's performance.
The LookaheadDistance
property computes a look-ahead point on the
path, which is a local goal for the vehicle. The angular velocity command is computed based on
this point. Changing LookaheadDistance
has a significant impact on the
performance of the algorithm. A higher look-ahead distance results in a smoother trajectory
for the vehicle, but can cause the vehicle to cut corners along the path. A low look-ahead
distance can result in oscillations in tracking the path, causing unstable behavior. For more
information on the pure pursuit algorithm, see Pure Pursuit Controller.
To compute linear and angular velocity control commands:
Create the
controllerPurePursuit
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
creates
a pure pursuit object that uses the pure pursuit algorithm to compute the linear and
angular velocity inputs for a differential drive vehicle.controller
= controllerPurePursuit
creates a pure pursuit object with additional options specified by one or more
controller
= controllerPurePursuit(Name,Value)Name,Value
pairs. Name is the property name and Value is the
corresponding value. Name must appear inside single quotes (' '
). You
can specify several name-value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
. Properties not specified retain
their default values.
Example: controller = controllerPurePursuit('DesiredLinearVelocity',
0.5)
Properties
Usage
Description
[
returns the look-ahead point, which is a location on the path used to compute the velocity
commands. This location on the path is computed using the
vel
,angvel
,lookaheadpoint
]
= controller(pose
)LookaheadDistance
property on the controller
object.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2019b
See Also
binaryOccupancyMap
(Robotics System Toolbox) | occupancyMap
| binaryOccupancyMap
| occupancyMap
| controllerVFH