Spline5

class wpimath.Spline5

Bases: pybind11_object

Represents a two-dimensional parametric spline that interpolates between two points.

@tparam Degree The degree of the spline.

class ControlVector(x: Tuple[SupportsFloat | SupportsIndex, SupportsFloat | SupportsIndex, SupportsFloat | SupportsIndex], y: Tuple[SupportsFloat | SupportsIndex, SupportsFloat | SupportsIndex, SupportsFloat | SupportsIndex])

Bases: pybind11_object

Represents a control vector for a spline.

Each element in each array represents the value of the derivative at the index. For example, the value of x[2] is the second derivative in the x dimension.

coefficients() Annotated[numpy.typing.NDArray[numpy.float64], '[6, 6]']

Returns the coefficients of the spline.

Returns:

The coefficients of the spline.

getFinalControlVector() wpimath._wpimath.Spline5.ControlVector

Returns the final control vector that created this spline.

Returns:

The final control vector that created this spline.

getInitialControlVector() wpimath._wpimath.Spline5.ControlVector

Returns the initial control vector that created this spline.

Returns:

The initial control vector that created this spline.

getPoint(t: SupportsFloat | SupportsIndex) tuple[wpimath._wpimath.Pose2d, wpimath.units.radians_per_meter] | None

Gets the pose and curvature at some point t on the spline.

Parameters:

t – The point t

Returns:

The pose and curvature at that point.