WPILibC++ 2024.3.2
|
Represents a two-dimensional parametric spline that interpolates between two points. More...
#include <frc/spline/Spline.h>
Classes | |
struct | ControlVector |
Represents a control vector for a spline. More... | |
Public Types | |
using | PoseWithCurvature = std::pair< Pose2d, units::curvature_t > |
Public Member Functions | |
Spline ()=default | |
Spline (const Spline &)=default | |
Spline & | operator= (const Spline &)=default |
Spline (Spline &&)=default | |
Spline & | operator= (Spline &&)=default |
virtual | ~Spline ()=default |
PoseWithCurvature | GetPoint (double t) const |
Gets the pose and curvature at some point t on the spline. More... | |
virtual Matrixd< 6, Degree+1 > | Coefficients () const =0 |
Returns the coefficients of the spline. More... | |
virtual const ControlVector & | GetInitialControlVector () const =0 |
Returns the initial control vector that created this spline. More... | |
virtual const ControlVector & | GetFinalControlVector () const =0 |
Returns the final control vector that created this spline. More... | |
Static Protected Member Functions | |
static Eigen::Vector2d | ToVector (const Translation2d &translation) |
Converts a Translation2d into a vector that is compatible with Eigen. More... | |
static Translation2d | FromVector (const Eigen::Vector2d &vector) |
Converts an Eigen vector into a Translation2d. More... | |
Represents a two-dimensional parametric spline that interpolates between two points.
Degree | The degree of the spline. |
using frc::Spline< Degree >::PoseWithCurvature = std::pair<Pose2d, units::curvature_t> |
|
default |
|
default |
|
default |
|
virtualdefault |
|
pure virtual |
Returns the coefficients of the spline.
Implemented in frc::CubicHermiteSpline, and frc::QuinticHermiteSpline.
|
inlinestaticprotected |
Converts an Eigen vector into a Translation2d.
vector | The vector to convert. |
|
pure virtual |
Returns the final control vector that created this spline.
Implemented in frc::CubicHermiteSpline, and frc::QuinticHermiteSpline.
|
pure virtual |
Returns the initial control vector that created this spline.
Implemented in frc::CubicHermiteSpline, and frc::QuinticHermiteSpline.
|
inline |
Gets the pose and curvature at some point t on the spline.
t | The point t |
|
default |
|
default |
|
inlinestaticprotected |
Converts a Translation2d into a vector that is compatible with Eigen.
translation | The Translation2d to convert. |