Class SwerveControllerConfiguration

java.lang.Object
swervelib.parser.SwerveControllerConfiguration

public class SwerveControllerConfiguration extends Object
Swerve Controller configuration class which is used to configure SwerveController.
  • Field Details

    • headingPIDF

      public final PIDFConfig headingPIDF
      PIDF for the heading of the robot.
    • angleJoyStickRadiusDeadband

      public final double angleJoyStickRadiusDeadband
      hypotenuse deadband for the robot angle control joystick.
    • maxAngularVelocity

      public double maxAngularVelocity
      Maximum angular velocity in rad/s
  • Constructor Details

    • SwerveControllerConfiguration

      public SwerveControllerConfiguration(SwerveDriveConfiguration driveCfg, PIDFConfig headingPIDF, double angleJoyStickRadiusDeadband, double maxSpeedMPS)
      Construct the swerve controller configuration. Assumes robot is square to fetch maximum angular velocity.
      Parameters:
      driveCfg - SwerveDriveConfiguration to fetch the first module X and Y used to calculate the maximum angular velocity.
      headingPIDF - Heading PIDF configuration.
      angleJoyStickRadiusDeadband - Deadband on radius of angle joystick.
      maxSpeedMPS - Maximum speed in meters per second for angular velocity, remember if you have feet per second use Units.feetToMeters(double).
    • SwerveControllerConfiguration

      public SwerveControllerConfiguration(SwerveDriveConfiguration driveCfg, PIDFConfig headingPIDF, double maxSpeedMPS)
      Construct the swerve controller configuration. Assumes hypotenuse deadband of 0.5 (minimum radius for angle to be set on angle joystick is .5 of the controller).
      Parameters:
      driveCfg - Drive configuration.
      headingPIDF - Heading PIDF configuration.
      maxSpeedMPS - Maximum speed in meters per second for angular velocity, remember if you have feet per second use Units.feetToMeters(double).