|
ChoreoLib
|
A single state in a ChoreoTrajectory. More...
#include <ChoreoTrajectoryState.h>
Public Member Functions | |
| ChoreoTrajectoryState (units::second_t t, units::meter_t x, units::meter_t y, units::radian_t heading, units::meters_per_second_t xVel, units::meters_per_second_t yVel, units::radians_per_second_t angularVel) | |
| frc::Pose2d | GetPose () const |
| frc::ChassisSpeeds | GetChassisSpeeds () const |
| ChoreoTrajectoryState | Interpolate (const ChoreoTrajectoryState &endValue, double i) const |
| std::array< double, 7 > | AsArray () const |
| ChoreoTrajectoryState | Flipped () const |
A single state in a ChoreoTrajectory.
| ChoreoTrajectoryState::ChoreoTrajectoryState | ( | units::second_t | t, |
| units::meter_t | x, | ||
| units::meter_t | y, | ||
| units::radian_t | heading, | ||
| units::meters_per_second_t | xVel, | ||
| units::meters_per_second_t | yVel, | ||
| units::radians_per_second_t | angularVel ) |
Creates a new ChoreoTrajectoryState given all its parameters
| t | The timestamp of the new state |
| x | The x position of the robot at this state |
| y | The y position of the robot at this state |
| heading | The heading of the robot at this state |
| xVel | The x velocity of the robot at this state |
| yVel | The x velocity of the robot at this state |
| angularVel | The angular velocity of the robot at this state |
| std::array< double, 7 > ChoreoTrajectoryState::AsArray | ( | ) | const |
Returns this state as an array of doubles
| ChoreoTrajectoryState ChoreoTrajectoryState::Flipped | ( | ) | const |
Returns a new instance of this state mirrored across the midline of the field
| frc::ChassisSpeeds ChoreoTrajectoryState::GetChassisSpeeds | ( | ) | const |
Returns the field-relative chassis speeds of this state.
| frc::Pose2d ChoreoTrajectoryState::GetPose | ( | ) | const |
Returns the pose of the robot at this state
| ChoreoTrajectoryState ChoreoTrajectoryState::Interpolate | ( | const ChoreoTrajectoryState & | endValue, |
| double | i ) const |
Returns a new state interpolated between itself and endValue at i
| endValue | The next state. It should have a timestamp after this state. |
| i | how far between the two trajectories we should be in range (0,1) |