Package com.thunder.lib.trajectory
Class ThunderTrajectoryRunnerProperties
java.lang.Object
com.thunder.lib.trajectory.ThunderTrajectoryRunnerProperties
A set of callback functions and properties required to run a trajectory.
-
Constructor Summary
ConstructorsConstructorDescriptionThunderTrajectoryRunnerProperties(Supplier<Pose2d> getPose, Consumer<Pose2d> resetPose, Consumer<ChassisSpeeds> setSpeeds, HolonomicDriveController holonomicDriveController) Constructor for ThunderTrajectoryRunnerProperties. -
Method Summary
Modifier and TypeMethodDescriptionGets the holonomic drive controller.Gets the pose supplier function.Gets the reset pose consumer function.Gets the chassis speeds consumer function.
-
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
Gets the pose supplier function.- Returns:
- The pose supplier.
-
getResetPoseConsumer
Gets the reset pose consumer function.- Returns:
- The reset pose consumer.
-
getSpeedsConsumer
Gets the chassis speeds consumer function.- Returns:
- The chassis speeds consumer.
-
getHolonomicDriveController
Gets the holonomic drive controller.- Returns:
- The holonomic drive controller.
-