TrajoptLib
Library for generating time-optimal trajectories for FRC robots.
Loading...
Searching...
No Matches
trajopt::Spline< Degree > Class Template Referenceabstract

#include <trajopt/spline/spline.hpp>

Classes

struct  ControlVector

Public Types

using PoseWithCurvature = std::pair<Pose2d, double>
 Pose2d with curvature.

Public Member Functions

std::optional< PoseWithCurvature > get_point (double t) const
virtual const Eigen::Matrix< double, 6, Degree+1 > & coefficients () const =0
virtual const ControlVector & get_initial_control_vector () const =0
virtual const ControlVector & get_final_control_vector () const =0

Detailed Description

template<int Degree>
class trajopt::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 const Eigen::Matrix< double, 6, Degree+1 > & trajopt::Spline< Degree >::coefficients ( ) const
pure virtual

Returns the coefficients of the spline.

Returns
The coefficients of the spline.

Implemented in trajopt::CubicHermiteSpline.

◆ get_final_control_vector()

template<int Degree>
virtual const ControlVector & trajopt::Spline< Degree >::get_final_control_vector ( ) const
pure virtual

Returns the final control vector that created this spline.

Returns
The final control vector that created this spline.

Implemented in trajopt::CubicHermiteSpline.

◆ get_initial_control_vector()

template<int Degree>
virtual const ControlVector & trajopt::Spline< Degree >::get_initial_control_vector ( ) const
pure virtual

Returns the initial control vector that created this spline.

Returns
The initial control vector that created this spline.

Implemented in trajopt::CubicHermiteSpline.

◆ get_point()

template<int Degree>
std::optional< PoseWithCurvature > trajopt::Spline< Degree >::get_point ( 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.

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