Projects sequence of points onto path
uses the closest point within a sequence of points,
pathPoints = closestPointsToSequence(
points, to be
within the valid search window,
initWindow. For each point in
Points, the search window is centered at the previous point.
optionally returns a logical vector
inWindow] = closestPointsToSequence(
inWindow, specifying whether each
point for the corresponding xy coordinate in
is projected within the search window.
refPath — Reference path
Reference path, specified as a
points — Global points
P-by-2 numeric matrix
Global points, specified as a P-by-2 numeric matrix with rows of the form
[x y]. P is the number of points. Positions
are in meters.
initWindow — Initial search window
two-element row vector
Initial search window, specified as a two-element row vector in the form
[minimum_bound maximum_bound] .
pathPoints — Closest points on reference path
N-by-6 numeric matrix
Closest points on the reference path , returned as an N-by-6
numeric matrix with rows of form
x y and theta — SE(2) state expressed in global coordinates, with x and y in meters and theta in radians
kappa — Curvature, or inverse of the radius, in
dkappa — Derivative of curvature with respect to arc length in
s — Arc length, or distance along path from path origin, in meters
N is the number of points sampled along the reference path.
inWindow — Indicator of points being in search window
N-element logical column vector
Indication whether each point nearest to the corresponding xy coordinate in
points, is projected within the search window, returned as an
N-element logical column vector, where N is
the number of points in
points. Points being projected within the
search window are
false if they lie at
the end of a window.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2022a