Main Content

interpolate

Interpolate reference path at provided arc lengths

Description

pathPoints = interpolate(refPath,arclengths) interpolates the reference path at the provided arc lengths and returns the interpolated points on the path in global coordinates.

Input Arguments

collapse all

Reference path, specified as a referencePathFrenet object.

Distances along the reference path, specified as an N-element vector. N is the number of arc lengths at which to sample points. Each distance is in meters.

Output Arguments

collapse all

Points on the reference path , returned as an N-by-6 numeric matrix with rows of form [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 meters

  • dkappa — Derivative of curvature with respect to arc length in meters per second

  • s — Arc length, or distance along path from path origin, in meters

N is the number of points sampled along the reference path.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2020b