Brick
Loading...
Searching...
No Matches
HermitePoint Struct Reference

#include <hermite_point.h>

Description

Represents a boundary point along a Hermite spline.

Each point stores position (2D), first derivative (tangent/velocity), and optional second derivative (acceleration) information.

Public Member Functions

 HermitePoint ()=default
 Default constructor initializing all vectors to zero.
 HermitePoint (const Translation2d &point, const Translation2d &tangent, const Translation2d &second_derivative=Translation2d())
 Constructs a HermitePoint from Translation2d vectors.
 HermitePoint (double x, double y, double vx, double vy)
 Constructs a HermitePoint from scalar position and tangent components.
 HermitePoint (double x, double y, double vx, double vy, double ax, double ay)
 Constructs a HermitePoint from scalar position, tangent, and second derivative components.
Translation2d get_point () const
Translation2d get_tangent () const
Translation2d get_second_derivative () const

Static Public Member Functions

static HermitePoint from_derivatives (const Translation2d &point, const Translation2d &tangent, const Translation2d &second_derivative=Translation2d())
 Factory method constructing HermitePoint from explicit derivative vectors.
static HermitePoint from_heading (units::Length x, units::Length y, Rotation2d heading, double speed, Rotation2d accel_heading=Rotation2d(), double accel_mag=0.0)
 Factory method constructing HermitePoint from heading angle and scalar speed.
static HermitePoint from_heading (const Translation2d &point, Rotation2d heading, double speed, Rotation2d accel_heading=Rotation2d(), double accel_mag=0.0)
 Factory method constructing HermitePoint from position vector, heading angle, and speed.
static HermitePoint from_pose (const Pose2d &pose, double speed, double accel_mag=0.0)
 Factory method constructing HermitePoint from Pose2d and speeds.

Public Attributes

Translation2d point
 2D position coordinates (x, y)
Translation2d tangent
 First derivative vector (dx/du, dy/du).
Translation2d second_derivative
 Second derivative vector (d^2x/du^2, d^2y/du^2).

Constructor & Destructor Documentation

◆ HermitePoint() [1/3]

HermitePoint::HermitePoint ( const Translation2d & point,
const Translation2d & tangent,
const Translation2d & second_derivative = Translation2d() )
inline

Constructs a HermitePoint from Translation2d vectors.

Parameters
point2D position vector.
tangentTangent (first derivative) vector.
second_derivativeSecond derivative vector (default zero).

◆ HermitePoint() [2/3]

HermitePoint::HermitePoint ( double x,
double y,
double vx,
double vy )
inline

Constructs a HermitePoint from scalar position and tangent components.

Parameters
xX coordinate.
yY coordinate.
vxX tangent component.
vyY tangent component.

◆ HermitePoint() [3/3]

HermitePoint::HermitePoint ( double x,
double y,
double vx,
double vy,
double ax,
double ay )
inline

Constructs a HermitePoint from scalar position, tangent, and second derivative components.

Parameters
xX coordinate.
yY coordinate.
vxX tangent component.
vyY tangent component.
axX second derivative component.
ayY second derivative component.

Member Function Documentation

◆ from_derivatives()

HermitePoint HermitePoint::from_derivatives ( const Translation2d & point,
const Translation2d & tangent,
const Translation2d & second_derivative = Translation2d() )
inlinestatic

Factory method constructing HermitePoint from explicit derivative vectors.

Parameters
point2D position vector.
tangentTangent vector.
second_derivativeSecond derivative vector.
Returns
Constructed HermitePoint instance.

◆ from_heading() [1/2]

HermitePoint HermitePoint::from_heading ( const Translation2d & point,
Rotation2d heading,
double speed,
Rotation2d accel_heading = Rotation2d(),
double accel_mag = 0.0 )
inlinestatic

Factory method constructing HermitePoint from position vector, heading angle, and speed.

Parameters
point2D position vector.
headingHeading angle.
speedTangent magnitude.
accel_headingSecond derivative direction.
accel_magSecond derivative magnitude.
Returns
Constructed HermitePoint instance.

◆ from_heading() [2/2]

HermitePoint HermitePoint::from_heading ( units::Length x,
units::Length y,
Rotation2d heading,
double speed,
Rotation2d accel_heading = Rotation2d(),
double accel_mag = 0.0 )
inlinestatic

Factory method constructing HermitePoint from heading angle and scalar speed.

Parameters
xX coordinate in inches.
yY coordinate in inches.
headingHeading angle.
speedTangent magnitude (speed factor).
accel_headingSecond derivative direction.
accel_magSecond derivative magnitude.
Returns
Constructed HermitePoint instance.

◆ from_pose()

HermitePoint HermitePoint::from_pose ( const Pose2d & pose,
double speed,
double accel_mag = 0.0 )
inlinestatic

Factory method constructing HermitePoint from Pose2d and speeds.

Parameters
pose2D position and orientation.
speedTangent magnitude.
accel_magSecond derivative magnitude.
Returns
Constructed HermitePoint instance.

◆ get_point()

Translation2d HermitePoint::get_point ( ) const
inline
Returns
2D position vector.

◆ get_second_derivative()

Translation2d HermitePoint::get_second_derivative ( ) const
inline
Returns
Second derivative vector.

◆ get_tangent()

Translation2d HermitePoint::get_tangent ( ) const
inline
Returns
Tangent vector.

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