Class SwerveSettings

java.lang.Object
frc.team_8840_lib.utils.controllers.swerve.SwerveSettings

public class SwerveSettings extends Object
  • Field Details

    • invertGyro

      public boolean invertGyro
    • trackWidth

      public Unit trackWidth
    • wheelBase

      public Unit wheelBase
    • wheelDiameter

      public double wheelDiameter
    • doManualConversion

      public boolean doManualConversion
    • driveGearRatio

      public double driveGearRatio
    • angleGearRatio

      public double angleGearRatio
    • maxSpeed

      public Unit maxSpeed
    • maxAngularSpeed

      public double maxAngularSpeed
    • driveOpenRampRate

      public double driveOpenRampRate
    • driveClosedRampRate

      public double driveClosedRampRate
    • canCoderInverted

      public boolean canCoderInverted
    • driveInverted

      public boolean driveInverted
    • turnInverted

      public boolean turnInverted
    • manualOffset

      public boolean manualOffset
    • turnPID

      public PIDStruct turnPID
    • drivePID

      public PIDStruct drivePID
    • useCurrentLimits

      public boolean useCurrentLimits
    • driveCurrentLimit

      public CurrentLimit driveCurrentLimit
    • turnCurrentLimit

      public CurrentLimit turnCurrentLimit
    • secondaryDriveCurrentLimit

      public CurrentLimit secondaryDriveCurrentLimit
    • secondaryTurnCurrentLimit

      public CurrentLimit secondaryTurnCurrentLimit
    • voltageCompensation

      public double voltageCompensation
    • driveKS

      public double driveKS
    • driveKV

      public double driveKV
    • driveKA

      public double driveKA
    • driveIdleMode

      public com.revrobotics.CANSparkBase.IdleMode driveIdleMode
    • turnIdleMode

      public com.revrobotics.CANSparkBase.IdleMode turnIdleMode
    • threshold

      public double threshold
    • useThresholdAsPercentage

      public boolean useThresholdAsPercentage
    • gyroscopeStartingAngle

      public edu.wpi.first.math.geometry.Rotation2d gyroscopeStartingAngle
  • Constructor Details

    • SwerveSettings

      public SwerveSettings()
  • Method Details

    • wheelCircumference

      public double wheelCircumference()
    • relativeThreshold

      public double relativeThreshold()
      Gets the min speed for the drive motors using threshold as a percentage of max speed (0.01% by default)
    • getKinematics

      public edu.wpi.first.math.kinematics.SwerveDriveKinematics getKinematics()
      Returns the kinematics for the swerve drive
    • getPositions

      public edu.wpi.first.math.geometry.Translation2d[] getPositions()
      Returns the calculated positions of the modules with the given track width and wheel base
    • updateKinematics

      public void updateKinematics()
      Updates the kinematics with the new wheelbase and trackwidth