Class SwerveConfig

java.lang.Object
frc.robot.subsystems.swerve.SwerveConfig

public class SwerveConfig extends Object
  • Constructor Details

    • SwerveConfig

      public SwerveConfig()
  • Method Details

    • getModules

    • updateConfig

      public SwerveConfig updateConfig()
    • getEncoderOffsetRotations

      public double[] getEncoderOffsetRotations()
      The offsets last passed to configEncoderOffsets(double, double, double, double), in rotations (front left, front right, back left, back right), or null if it was never called. Kept as given, so the params defaults (SwerveOffsetParams) are exactly the numbers in the robot's config.
    • configEncoderOffsets

      public SwerveConfig configEncoderOffsets(double frontLeft, double frontRight, double backLeft, double backRight)
    • getSimLoopPeriod

      public double getSimLoopPeriod()
    • getDeadband

      public double getDeadband()
    • setDeadband

      public void setDeadband(double deadband)
    • getAimDeadband

      public double getAimDeadband()
    • setAimDeadband

      public void setAimDeadband(double aimDeadband)
    • getDriveGearRatio

      public double getDriveGearRatio()
    • setDriveGearRatio

      public void setDriveGearRatio(double driveGearRatio)
    • getSteerGearRatio

      public double getSteerGearRatio()
    • setSteerGearRatio

      public void setSteerGearRatio(double steerGearRatio)
    • getWheelRadius

      public Distance getWheelRadius()
    • setWheelRadius

      public void setWheelRadius(Distance wheelRadius)
    • getLinearSpeedAt12Volts

      public LinearVelocity getLinearSpeedAt12Volts()
    • setLinearSpeedAt12Volts

      public void setLinearSpeedAt12Volts(LinearVelocity linearSpeedAt12Volts)
    • getAngularSpeedAt12Volts

      public AngularVelocity getAngularSpeedAt12Volts()
    • setAngularSpeedAt12Volts

      public void setAngularSpeedAt12Volts(AngularVelocity angularSpeedAt12Volts)
    • getOnboardImuMount

      public OnboardIMU.MountOrientation getOnboardImuMount()
    • setOnboardImuMount

      public void setOnboardImuMount(OnboardIMU.MountOrientation onboardImuMount)
    • getKPRotationController

      public double getKPRotationController()
    • getKIRotationController

      public double getKIRotationController()
    • getKDRotationController

      public double getKDRotationController()
    • getBlueAlliancePerspectiveRotation

      public Rotation2d getBlueAlliancePerspectiveRotation()
    • getRedAlliancePerspectiveRotation

      public Rotation2d getRedAlliancePerspectiveRotation()
    • getSteerGains

      public Slot0Configs getSteerGains()
    • getDriveGains

      public Slot0Configs getDriveGains()
    • getSteerClosedLoopOutput

      public SwerveModuleConstants.ClosedLoopOutputType getSteerClosedLoopOutput()
    • getDriveClosedLoopOutput

      public SwerveModuleConstants.ClosedLoopOutputType getDriveClosedLoopOutput()
    • getSlipCurrent

      public Current getSlipCurrent()
    • setSlipCurrent

      public void setSlipCurrent(Current slipCurrent)
    • getDriveInitialConfigs

      public TalonFXConfiguration getDriveInitialConfigs()
    • getSteerInitialConfigs

      public TalonFXConfiguration getSteerInitialConfigs()
    • getCanCoderInitialConfigs

      public CANcoderConfiguration getCanCoderInitialConfigs()
    • getPigeonConfigs

      public Pigeon2Configuration getPigeonConfigs()
    • getCoupleRatio

      public double getCoupleRatio()
    • isSteerMotorReversed

      public boolean isSteerMotorReversed()
    • setSteerMotorReversed

      public void setSteerMotorReversed(boolean steerMotorReversed)
    • isInvertLeftSide

      public boolean isInvertLeftSide()
    • setInvertLeftSide

      public void setInvertLeftSide(boolean invertLeftSide)
    • isInvertRightSide

      public boolean isInvertRightSide()
    • setInvertRightSide

      public void setInvertRightSide(boolean invertRightSide)
    • getCanBus

      public CANBus getCanBus()
    • setCanBus

      public void setCanBus(CANBus canBus)
    • getPigeonId

      public int getPigeonId()
    • getSteerInertia

      public double getSteerInertia()
    • getDriveInertia

      public double getDriveInertia()
    • getSteerFrictionVoltage

      public Voltage getSteerFrictionVoltage()
    • getDriveFrictionVoltage

      public Voltage getDriveFrictionVoltage()
    • getDrivetrainConstants

      public SwerveDrivetrainConstants getDrivetrainConstants()
    • getConstantCreator

    • getDrivebaseRadiusInches

      public double getDrivebaseRadiusInches()
    • getDrivebaseRadiusMeters

      public double getDrivebaseRadiusMeters()
    • getFrontLeftDriveMotorId

      public int getFrontLeftDriveMotorId()
    • getFrontLeftSteerMotorId

      public int getFrontLeftSteerMotorId()
    • getFrontLeftEncoderId

      public int getFrontLeftEncoderId()
    • getFrontLeftEncoderOffset

      public Angle getFrontLeftEncoderOffset()
    • isFrontLeftSteerInverted

      public boolean isFrontLeftSteerInverted()
    • getFrontLeftXPos

      public Distance getFrontLeftXPos()
    • getFrontLeftYPos

      public Distance getFrontLeftYPos()
    • getFrontRightDriveMotorId

      public int getFrontRightDriveMotorId()
    • getFrontRightSteerMotorId

      public int getFrontRightSteerMotorId()
    • getFrontRightEncoderId

      public int getFrontRightEncoderId()
    • getFrontRightEncoderOffset

      public Angle getFrontRightEncoderOffset()
    • isFrontRightSteerInverted

      public boolean isFrontRightSteerInverted()
    • getFrontRightXPos

      public Distance getFrontRightXPos()
    • getFrontRightYPos

      public Distance getFrontRightYPos()
    • getBackLeftDriveMotorId

      public int getBackLeftDriveMotorId()
    • getBackLeftSteerMotorId

      public int getBackLeftSteerMotorId()
    • getBackLeftEncoderId

      public int getBackLeftEncoderId()
    • getBackLeftEncoderOffset

      public Angle getBackLeftEncoderOffset()
    • isBackLeftSteerInverted

      public boolean isBackLeftSteerInverted()
    • getBackLeftXPos

      public Distance getBackLeftXPos()
    • getBackLeftYPos

      public Distance getBackLeftYPos()
    • getBackRightDriveMotorId

      public int getBackRightDriveMotorId()
    • getBackRightSteerMotorId

      public int getBackRightSteerMotorId()
    • getBackRightEncoderId

      public int getBackRightEncoderId()
    • getBackRightEncoderOffset

      public Angle getBackRightEncoderOffset()
    • isBackRightSteerInverted

      public boolean isBackRightSteerInverted()
    • getBackRightXPos

      public Distance getBackRightXPos()
    • getBackRightYPos

      public Distance getBackRightYPos()
    • getTargetHeading

      public double getTargetHeading()
    • setTargetHeading

      public void setTargetHeading(double targetHeading)
    • getFrontLeft

    • getFrontRight

    • getBackLeft

    • getBackRight