Spline5
- class wpimath.spline.Spline5
Bases:
pybind11_objectRepresents a two-dimensional parametric spline that interpolates between two points.
@tparam Degree The degree of the spline.
- class ControlVector(x: Tuple[SupportsFloat, SupportsFloat, SupportsFloat], y: Tuple[SupportsFloat, SupportsFloat, SupportsFloat])
Bases:
pybind11_objectRepresents 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.
- property x Tuple[float, float, float]
The x components of the control vector.
- property y Tuple[float, float, float]
The y components of the control vector.
- coefficients() Annotated[numpy.typing.NDArray[numpy.float64], '[6, 6]']
Returns the coefficients of the spline.
- Returns:
The coefficients of the spline.
- getFinalControlVector() wpimath.spline._spline.Spline5.ControlVector
Returns the final control vector that created this spline.
- Returns:
The final control vector that created this spline.
- getInitialControlVector() wpimath.spline._spline.Spline5.ControlVector
Returns the initial control vector that created this spline.
- Returns:
The initial control vector that created this spline.
- getPoint(t: SupportsFloat) tuple[wpimath.geometry._geometry.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.