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

#include <trajopt/spline/cubic_hermite_pose_spline_holonomic.hpp>

Inheritance diagram for trajopt::CubicHermitePoseSplineHolonomic:
trajopt::CubicHermiteSpline

Public Types

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

Public Member Functions

 CubicHermitePoseSplineHolonomic (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, Rotation2d r0, Rotation2d r1)
Rotation2d GetCourse (double t) const
Rotation2d get_heading (double t) const
double get_heading_rate (double t) const
std::optional< PoseWithCurvature > get_point (double t, bool is_differential) const

Detailed Description

Represents a cubic pose spline, which is a specific implementation of a cubic hermite spline.

Constructor & Destructor Documentation

◆ CubicHermitePoseSplineHolonomic()

trajopt::CubicHermitePoseSplineHolonomic::CubicHermitePoseSplineHolonomic ( 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,
Rotation2d r0,
Rotation2d r1 )
inline

Constructs a cubic pose spline.

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.
r0Initial heading.
r1Final heading.

Member Function Documentation

◆ get_heading()

Rotation2d trajopt::CubicHermitePoseSplineHolonomic::get_heading ( double t) const
inline

Return heading at point t.

Parameters
tThe point t
Returns
The heading at point t.

◆ get_heading_rate()

double trajopt::CubicHermitePoseSplineHolonomic::get_heading_rate ( double t) const
inline

Return heading rate at point t.

Parameters
tThe point t
Returns
The heading rate at point t.

◆ get_point()

std::optional< PoseWithCurvature > trajopt::CubicHermitePoseSplineHolonomic::get_point ( double t,
bool is_differential ) const
inline

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

Parameters
tThe point t
is_differentialWhether the drivetrain is a differential drive.
Returns
The pose and curvature at that point.

◆ GetCourse()

Rotation2d trajopt::CubicHermitePoseSplineHolonomic::GetCourse ( double t) const
inline

Return course at point t.

Parameters
tThe point t
Returns
The course at point t.

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