#include <ChoreoTrajectory.h>
Represents a trajectory loaded from Choreo. Made up of ChoreoTrajectoryStates
◆ ChoreoTrajectory()
Constructs a new trajectory from a list of trajectory states
- Parameters
-
| states | a vector containing a list of ChoreoTrajectoryStates |
◆ Flipped()
Returns a copy of this trajectory flipped across the midline of the field
- Returns
- a copy of this trajectory flipped across the midline of the field
◆ GetFinalPose()
| frc::Pose2d ChoreoTrajectory::GetFinalPose |
( |
| ) |
const |
Returns the final, non-mirrored pose of the trajectory.
- Returns
- the final, non-mirrored pose of the trajectory.
◆ GetFlippedFinalPose()
| frc::Pose2d ChoreoTrajectory::GetFlippedFinalPose |
( |
| ) |
const |
Returns the final, mirrored pose of the trajectory.
- Returns
- the final, mirrored pose of the trajectory.
◆ GetFlippedInitialPose()
| frc::Pose2d ChoreoTrajectory::GetFlippedInitialPose |
( |
| ) |
const |
Returns the initial, mirrored pose of the trajectory.
- Returns
- the initial, mirrored pose of the trajectory.
◆ GetInitialPose()
| frc::Pose2d ChoreoTrajectory::GetInitialPose |
( |
| ) |
const |
Returns the initial, non-mirrored pose of the trajectory.
- Returns
- the initial, non-mirrored pose of the trajectory.
◆ GetPoses()
| std::vector< frc::Pose2d > ChoreoTrajectory::GetPoses |
( |
| ) |
const |
Returns a list of robot poses at each sample of the trajectory
- Returns
- a list of robot poses at each sample of the trajectory
◆ GetSamples()
Returns a list of all the states in this trajectory
- Returns
- a list of all the states in this trajectory
◆ GetTotalTime()
| units::second_t ChoreoTrajectory::GetTotalTime |
( |
| ) |
const |
Returns the total run time of the trajectory
- Returns
- the total run time of the trajectory
◆ Sample()
| ChoreoTrajectoryState ChoreoTrajectory::Sample |
( |
units::second_t | timestamp, |
|
|
bool | mirrorForRedAlliance = false ) |
Samples the trajectory at the specified timestamp and optionally mirrors if on the red alliance
- Parameters
-
| timestamp | how far into the trajectory we want to sample |
| mirrorForRedAlliance | defaults to false. If true, mirrors the state across the midline of the field |
- Returns
- A ChoreoTrajectoryState that was sampled from this trajectory
◆ SetSamples()
Sets the samples of this trajectory without constructing a new trajectory
- Parameters
-
| newSamples | a list of all the new states to set this trajectory to |
The documentation for this class was generated from the following files:
- src/main/native/include/choreo/lib/ChoreoTrajectory.h
- src/main/native/cpp/choreo/lib/ChoreoTrajectory.cpp