TrajoptLib
Library for generating time-optimal trajectories for FRC robots.
Loading...
Searching...
No Matches
trajopt::CubicHermiteSpline Class Reference

Represents a hermite spline of degree 3. More...

#include <trajopt/spline/cubic_hermite_spline.hpp>

Inheritance diagram for trajopt::CubicHermiteSpline:
trajopt::Spline< 3 > trajopt::CubicHermitePoseSplineHolonomic

Public Member Functions

 CubicHermiteSpline (std::array< double, 2 > x_initial_control_vector, std::array< double, 2 > x_final_control_vector, std::array< double, 2 > y_initial_control_vector, std::array< double, 2 > y_final_control_vector)
const Eigen::Matrix< double, 6, 3+1 > & coefficients () const override
const ControlVector & get_initial_control_vector () const override
const ControlVector & get_final_control_vector () const override
Public Member Functions inherited from trajopt::Spline< 3 >
std::optional< PoseWithCurvature > get_point (double t) const

Additional Inherited Members

Public Types inherited from trajopt::Spline< 3 >
using PoseWithCurvature
 Pose2d with curvature.

Detailed Description

Represents a hermite spline of degree 3.

Constructor & Destructor Documentation

◆ CubicHermiteSpline()

trajopt::CubicHermiteSpline::CubicHermiteSpline ( std::array< double, 2 > x_initial_control_vector,
std::array< double, 2 > x_final_control_vector,
std::array< double, 2 > y_initial_control_vector,
std::array< double, 2 > y_final_control_vector )
inline

Constructs a cubic hermite spline with the specified control vectors. Each control vector contains info about the location of the point and its first derivative.

Parameters
x_initial_control_vectorThe control vector for the initial point in the x dimension.
x_final_control_vectorThe control vector for the final point in the x dimension.
y_initial_control_vectorThe control vector for the initial point in the y dimension.
y_final_control_vectorThe control vector for the final point in the y dimension.

Member Function Documentation

◆ coefficients()

const Eigen::Matrix< double, 6, 3+1 > & trajopt::CubicHermiteSpline::coefficients ( ) const
inlineoverridevirtual

Returns the coefficients matrix.

Returns
The coefficients matrix.

Implements trajopt::Spline< 3 >.

◆ get_final_control_vector()

const ControlVector & trajopt::CubicHermiteSpline::get_final_control_vector ( ) const
inlineoverridevirtual

Returns the final control vector that created this spline.

Returns
The final control vector that created this spline.

Implements trajopt::Spline< 3 >.

◆ get_initial_control_vector()

const ControlVector & trajopt::CubicHermiteSpline::get_initial_control_vector ( ) const
inlineoverridevirtual

Returns the initial control vector that created this spline.

Returns
The initial control vector that created this spline.

Implements trajopt::Spline< 3 >.


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