32 units::second_t t = 0_s;
35 units::meters_per_second_t velocity = 0_mps;
38 units::meters_per_second_squared_t acceleration = 0_mps_sq;
75 units::second_t
TotalTime()
const {
return m_totalTime; }
82 const std::vector<State>&
States()
const {
return m_states; }
137 std::vector<State> m_states;
138 units::second_t m_totalTime = 0_s;
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
a class to store JSON values
Definition: json.h:96
Represents a 2D pose containing translational and rotational elements.
Definition: Pose2d.h:23
Represents a time-parameterized trajectory.
Definition: Trajectory.h:25
units::second_t TotalTime() const
Returns the overall duration of the trajectory.
Definition: Trajectory.h:75
Trajectory operator+(const Trajectory &other) const
Concatenates another trajectory to the current trajectory.
Trajectory TransformBy(const Transform2d &transform)
Transforms all poses in the trajectory by the given transform.
Trajectory RelativeTo(const Pose2d &pose)
Transforms all poses in the trajectory so that they are relative to the given pose.
bool operator==(const Trajectory &) const =default
Checks equality between this Trajectory and another object.
Trajectory(const std::vector< State > &states)
Constructs a trajectory from a vector of states.
State Sample(units::second_t t) const
Sample the trajectory at a point in time.
Pose2d InitialPose() const
Returns the initial pose of the trajectory.
Definition: Trajectory.h:129
const std::vector< State > & States() const
Return the states of the trajectory.
Definition: Trajectory.h:82
state
Definition: core.h:2271
Definition: AprilTagPoseEstimator.h:15
WPILIB_DLLEXPORT void from_json(const wpi::json &json, AprilTagFieldLayout &layout)
WPILIB_DLLEXPORT void to_json(wpi::json &json, const AprilTagFieldLayout &layout)
Represents one point on the trajectory.
Definition: Trajectory.h:30
Pose2d pose
The pose at that point of the trajectory.
Definition: Trajectory.h:41
State Interpolate(State endValue, double i) const
Interpolates between two States.
bool operator==(const State &) const =default
Checks equality between this State and another object.