Class ThunderTrajectoryRunnerProperties

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

public class ThunderTrajectoryRunnerProperties extends Object
A set of callback functions and properties required to run a trajectory.
  • Constructor Details

    • ThunderTrajectoryRunnerProperties

      public ThunderTrajectoryRunnerProperties(Supplier<Pose2d> getPose, Consumer<Pose2d> resetPose, Consumer<ChassisSpeeds> setSpeeds, HolonomicDriveController holonomicDriveController)
      Constructor for ThunderTrajectoryRunnerProperties.
      Parameters:
      getPose - Function that returns the current robot pose.
      resetPose - Function that resets the robot pose (and PID controllers too!)
      setSpeeds - Function that controls the robot chassis speeds (robot-centric).
      holonomicDriveController - The holonomic drive controller for trajectory following. ThunderLib will NOT reset its x, y, or theta PID controllers; the user should do that in the resetPose function if desired.
  • Method Details

    • getPoseSupplier

      public Supplier<Pose2d> getPoseSupplier()
      Gets the pose supplier function.
      Returns:
      The pose supplier.
    • getResetPoseConsumer

      public Consumer<Pose2d> getResetPoseConsumer()
      Gets the reset pose consumer function.
      Returns:
      The reset pose consumer.
    • getSpeedsConsumer

      public Consumer<ChassisSpeeds> getSpeedsConsumer()
      Gets the chassis speeds consumer function.
      Returns:
      The chassis speeds consumer.
    • getHolonomicDriveController

      public HolonomicDriveController getHolonomicDriveController()
      Gets the holonomic drive controller.
      Returns:
      The holonomic drive controller.