Class Trajectory.State

java.lang.Object
edu.wpi.first.math.trajectory.Trajectory.State
All Implemented Interfaces:
ProtobufSerializable, WPISerializable
Enclosing class:
Trajectory

public static class Trajectory.State extends Object implements ProtobufSerializable
Represents a time-parameterized trajectory. The trajectory contains of various States that represent the pose, curvature, time elapsed, velocity, and acceleration at that point.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
    The acceleration at that point of the trajectory in m/s².
    double
    The curvature at that point of the trajectory in rad/m.
    The pose at that point of the trajectory.
    Trajectory.State protobuf for serialization.
    double
    The time elapsed since the beginning of the trajectory in seconds.
    double
    The speed at that point of the trajectory in meters per second.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    State(double time, double velocity, double acceleration, Pose2d pose, double curvature)
    Constructs a State with the specified parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • proto

      public static final TrajectoryStateProto proto
      Trajectory.State protobuf for serialization.
    • time

      public double time
      The time elapsed since the beginning of the trajectory in seconds.
    • velocity

      public double velocity
      The speed at that point of the trajectory in meters per second.
    • acceleration

      public double acceleration
      The acceleration at that point of the trajectory in m/s².
    • pose

      public Pose2d pose
      The pose at that point of the trajectory.
    • curvature

      public double curvature
      The curvature at that point of the trajectory in rad/m.
  • Constructor Details

    • State

      public State()
      Default constructor.
    • State

      public State(double time, double velocity, double acceleration, Pose2d pose, double curvature)
      Constructs a State with the specified parameters.
      Parameters:
      time - The time elapsed since the beginning of the trajectory in seconds.
      velocity - The speed at that point of the trajectory in m/s.
      acceleration - The acceleration at that point of the trajectory in m/s².
      pose - The pose at that point of the trajectory.
      curvature - The curvature at that point of the trajectory in rad/m.
  • Method Details