Class SetpointDriverProfile

java.lang.Object
frc.robot.services.control.GenericControlProfile
frc.robot.services.control.driver.profiles.SetpointDriverProfile
All Implemented Interfaces:
ControlProfile, DriverProfile

public class SetpointDriverProfile extends GenericControlProfile implements DriverProfile
A driver profile that generates smooth, kinematically limited setpoints. Limits translational acceleration as a 2D vector to prevent swerve module skewing, and limits rotational acceleration to prevent wheel slip. This is inspired by 254's approach.
  • Constructor Details

    • SetpointDriverProfile

      public SetpointDriverProfile(XboxController controller, LinearVelocity maxLinearVelocity, LinearAcceleration maxLinearAcceleration, AngularVelocity maxAngularVelocity, AngularAcceleration maxAngularAcceleration, Supplier<ChassisSpeeds> currentSpeedsSupplier, BooleanSupplier isRobotReadyToFire)
      Constructs a SetpointDriverProfile.
      Parameters:
      controller - The Xbox controller used for input.
      maxLinearVelocity - The maximum linear velocity allowed.
      maxLinearAcceleration - The maximum linear acceleration allowed.
      maxAngularVelocity - The maximum angular velocity allowed.
      maxAngularAcceleration - The maximum angular acceleration allowed.
      currentSpeedsSupplier - Supplier for the robot's actual measured speeds.
      isRobotReadyToFire - BooleanSupplier indicating if the robot is ready to fire.
  • Method Details