WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::math::Trajectory::State Struct Reference

Represents one point on the trajectory. More...

#include <wpi/math/trajectory/Trajectory.hpp>

Public Member Functions

constexpr bool operator== (const State &) const =default
 Checks equality between this State and another object.
constexpr State Interpolate (State endValue, double i) const
 Interpolates between two States.

Public Attributes

wpi::units::second_t t = 0_s
 The time elapsed since the beginning of the trajectory.
wpi::units::meters_per_second_t velocity = 0_mps
 The velocity at that point of the trajectory.
wpi::units::meters_per_second_squared_t acceleration = 0_mps_sq
 The acceleration at that point of the trajectory.
Pose2d pose
 The pose at that point of the trajectory.
wpi::units::curvature_t curvature {0.0}
 The curvature at that point of the trajectory.

Detailed Description

Represents one point on the trajectory.

Member Function Documentation

◆ Interpolate()

State wpi::math::Trajectory::State::Interpolate ( State endValue,
double i ) const
inlineconstexpr

Interpolates between two States.

Parameters
endValueThe end value for the interpolation.
iThe interpolant (fraction).
Returns
The interpolated state.

◆ operator==()

bool wpi::math::Trajectory::State::operator== ( const State & ) const
constexprdefault

Checks equality between this State and another object.

Member Data Documentation

◆ acceleration

wpi::units::meters_per_second_squared_t wpi::math::Trajectory::State::acceleration = 0_mps_sq

The acceleration at that point of the trajectory.

◆ curvature

wpi::units::curvature_t wpi::math::Trajectory::State::curvature {0.0}

The curvature at that point of the trajectory.

◆ pose

Pose2d wpi::math::Trajectory::State::pose

The pose at that point of the trajectory.

◆ t

wpi::units::second_t wpi::math::Trajectory::State::t = 0_s

The time elapsed since the beginning of the trajectory.

◆ velocity

wpi::units::meters_per_second_t wpi::math::Trajectory::State::velocity = 0_mps

The velocity at that point of the trajectory.


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