WPILibC++  2020.3.2-60-g3011ebe
frc::Spline< Degree > Class Template Referenceabstract

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

#include <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 (const Spline &)=default
 
Splineoperator= (const Spline &)=default
 
 Spline (Spline &&)=default
 
Splineoperator= (Spline &&)=default
 
PoseWithCurvature GetPoint (double t) const
 Gets the pose and curvature at some point t on the spline. More...
 

Protected Member Functions

virtual Eigen::Matrix< double, 6, Degree+1 > Coefficients () const =0
 Returns the coefficients of the 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...
 

Detailed Description

template<int Degree>
class frc::Spline< Degree >

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

Template Parameters
DegreeThe degree of the spline.

Member Function Documentation

◆ Coefficients()

template<int Degree>
virtual Eigen::Matrix<double, 6, Degree + 1> frc::Spline< Degree >::Coefficients ( ) const
protectedpure virtual

Returns the coefficients of the spline.

Returns
The coefficients of the spline.

Implemented in frc::QuinticHermiteSpline, and frc::CubicHermiteSpline.

◆ FromVector()

template<int Degree>
static Translation2d frc::Spline< Degree >::FromVector ( const Eigen::Vector2d &  vector)
inlinestaticprotected

Converts an Eigen vector into a Translation2d.

Parameters
vectorThe vector to convert.
Returns
The Translation2d.

◆ GetPoint()

template<int Degree>
PoseWithCurvature frc::Spline< Degree >::GetPoint ( double  t) const
inline

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

Parameters
tThe point t
Returns
The pose and curvature at that point.

◆ ToVector()

template<int Degree>
static Eigen::Vector2d frc::Spline< Degree >::ToVector ( const Translation2d translation)
inlinestaticprotected

Converts a Translation2d into a vector that is compatible with Eigen.

Parameters
translationThe Translation2d to convert.
Returns
The vector.

The documentation for this class was generated from the following file: