referencePathFrenet
Description
The referencePathFrenet
object fits a smooth, piecewise,
continuous curve to a set of waypoints given as [x
y]
or [x
y
theta]
. After fitting, points along the curve, the path points
are expressed as [x
y
theta
kappa
dkappa
s]
, where:
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
m-1
dkappa — Derivative of curvature with respect to arc length in
m-2
s — Arc length, or distance along path from path origin, in meters
Using this object, convert trajectories between global and Frenet coordinate systems, interpolate states along the path based on arc length, and query the closest point on a path from a global state.
The object expresses Frenet states as a vector of form [S
dS
ddS
L
dL
ddL]
, where S is the arc length and
L is the perpendicular deviation from the direction of the reference
path. Derivatives of S are relative to time. Derivatives of
L are relative to the arc length, S.
Creation
Description
refPathObj = referencePathFrenet(
fits a piecewise, continuous set of curves to the specified waypoints. The
waypoints
)waypoints
argument sets the Waypoints
property.
refPathObj = referencePathFrenet(___,
sets properties using one or more name-value pair arguments in addition to the input
arguments in the previous syntax. You can specify the DiscretizationDistance and MaxNumWaypoints properties as name-value arguments.Name,Value
)
Properties
Object Functions
closestPoint | Find closest point on reference path to global point |
closestPointsToSequence | Projects sequence of points onto path |
closestProjections | Find orthogonal projections between path tangent vector and query point |
curvature | Return curvature at arclength |
changeInCurvature | Return change-in-curvature at arclength |
frenet2global | Convert Frenet states to global states |
global2frenet | Convert global states to Frenet states |
interpolate | Interpolate reference path at provided arc lengths |
position | Return xy-position at arclength |
tangentAngle | Return tangent angle at arclength |
show | Display reference path in figure |
copy | Copy reference path |
Examples
More About
References
[1] Werling, Moritz, Julius Ziegler, Sören Kammel, and Sebastian Thrun. "Optimal Trajectory Generation for Dynamic Street Scenarios in a Frenet Frame." 2010 IEEE International Conference on Robotics and Automation. 2010, pp. 987–993.
[2] Bertolazzi, Enrico, and Marco Frego. “Fast and Accurate Clothoid Fitting.” Mathematical Methods in the Applied Sciences 38, no. 5 (March 30, 2015): 881–97. https://doi.org/10.1002/mma.3114.
Extended Capabilities
Version History
Introduced in R2020b