Class ThunderTrajectoryState

java.lang.Object
com.thunder.lib.trajectory.ThunderTrajectoryState

public class ThunderTrajectoryState extends Object
Class representing a state in a trajectory for a robot.
  • Constructor Details

    • ThunderTrajectoryState

      public ThunderTrajectoryState()
      Default constructor for ThunderTrajectoryState.
    • ThunderTrajectoryState

      public ThunderTrajectoryState(double timeSeconds, Pose2d pose, ChassisSpeeds chassisSpeeds, double linearVelocityMetersPerSecond, Rotation2d heading)
      Parameterized constructor for ThunderTrajectoryState.
      Parameters:
      timeSeconds - Time in seconds
      pose - Robot pose
      chassisSpeeds - Robot chassis speeds
      linearVelocityMetersPerSecond - Robot linear velocity in m/s
      heading - Robot heading
  • Method Details

    • getTimeSeconds

      public double getTimeSeconds()
      Get the time in seconds of this state in the trajectory.
      Returns:
      Time in seconds
    • setTimeSeconds

      public void setTimeSeconds(double timeSeconds)
      Set the time in seconds of this state in the trajectory.
      Parameters:
      timeSeconds - Time in seconds
    • getPose

      public Pose2d getPose()
      Get the robot pose at this state in the trajectory.
      Returns:
      Robot pose
    • setPose

      public void setPose(Pose2d pose)
      Set the robot pose at this state in the trajectory.
      Parameters:
      pose - Robot pose
    • getChassisSpeeds

      public ChassisSpeeds getChassisSpeeds()
      Get the robot chassis speeds at this state in the trajectory.
      Returns:
      Robot chassis speeds
    • setChassisSpeeds

      public void setChassisSpeeds(ChassisSpeeds chassisSpeeds)
      Set the robot chassis speeds at this state in the trajectory.
      Parameters:
      chassisSpeeds - Robot chassis speeds
    • getLinearVelocityMetersPerSecond

      public double getLinearVelocityMetersPerSecond()
      Get the robot linear velocity in meters per second at this state in the trajectory.
      Returns:
      Robot linear velocity in m/s
    • setLinearVelocityMetersPerSecond

      public void setLinearVelocityMetersPerSecond(double linearVelocityMetersPerSecond)
      Set the robot linear velocity in meters per second at this state in the trajectory.
      Parameters:
      linearVelocityMetersPerSecond - Robot linear velocity in m/s
    • getHeading

      public Rotation2d getHeading()
      Get the robot heading at this state in the trajectory.
      Returns:
      Robot heading
    • setHeading

      public void setHeading(Rotation2d heading)
      Set the robot heading at this state in the trajectory.
      Parameters:
      heading - Robot heading