Package frc.robot.swerve
Class SwerveConfig
java.lang.Object
frc.robot.swerve.SwerveConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfigEncoderOffsets(double frontLeft, double frontRight, double backLeft, double backRight) doubleintintintintintintdoubledoubledoubledoubledoubledoubleintintintintintintdoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubleintdoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoublebooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAimDeadband(double aimDeadband) voidvoidsetDeadband(double deadband) voidsetDriveGearRatio(double driveGearRatio) voidsetInvertLeftSide(boolean invertLeftSide) voidsetInvertRightSide(boolean invertRightSide) voidsetMaxAngularRate(double maxAngularRate) voidsetRobotLength(double robotLength) voidsetRobotWidth(double robotWidth) voidsetSlipCurrent(Current slipCurrent) voidsetSpeedAt12Volts(LinearVelocity speedAt12Volts) voidsetSteerGearRatio(double steerGearRatio) voidsetSteerMotorReversed(boolean steerMotorReversed) voidsetTargetHeading(double targetHeading) voidsetWheelRadius(Distance wheelRadius)
-
Constructor Details
-
SwerveConfig
public SwerveConfig()
-
-
Method Details
-
getModules
public SwerveModuleConstants<TalonFXConfiguration,TalonFXConfiguration, getModules()CANcoderConfiguration>[] -
updateConfig
-
configEncoderOffsets
public SwerveConfig configEncoderOffsets(double frontLeft, double frontRight, double backLeft, double backRight) -
getSimLoopPeriod
public double getSimLoopPeriod() -
getRobotWidth
public double getRobotWidth() -
setRobotWidth
public void setRobotWidth(double robotWidth) -
getRobotLength
public double getRobotLength() -
setRobotLength
public void setRobotLength(double robotLength) -
getMaxAngularRate
public double getMaxAngularRate() -
setMaxAngularRate
public void setMaxAngularRate(double maxAngularRate) -
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
-
setWheelRadius
-
getSpeedAt12Volts
-
setSpeedAt12Volts
-
getKSdrive
public double getKSdrive() -
getKSsteer
public double getKSsteer() -
getMaxAngularVelocity
public double getMaxAngularVelocity() -
getMaxAngularAcceleration
public double getMaxAngularAcceleration() -
getKPRotationController
public double getKPRotationController() -
getKIRotationController
public double getKIRotationController() -
getKDRotationController
public double getKDRotationController() -
getRotationTolerance
public double getRotationTolerance() -
getRotationVelocityTolerance
public double getRotationVelocityTolerance() -
getKPHoldController
public double getKPHoldController() -
getKIHoldController
public double getKIHoldController() -
getKDHoldController
public double getKDHoldController() -
getKPTranslationController
public double getKPTranslationController() -
getKITranslationController
public double getKITranslationController() -
getKDTranslationController
public double getKDTranslationController() -
getTranslationTolerance
public double getTranslationTolerance() -
getTranslationVelocityTolerance
public double getTranslationVelocityTolerance() -
getTranslationConstraints
-
getKPTagCenterController
public double getKPTagCenterController() -
getKITagCenterController
public double getKITagCenterController() -
getKDTagCenterController
public double getKDTagCenterController() -
getTagCenterTolerance
public double getTagCenterTolerance() -
getKPTagDistanceController
public double getKPTagDistanceController() -
getKITagDistanceController
public double getKITagDistanceController() -
getKDTagDistanceController
public double getKDTagDistanceController() -
getTagDistanceTolerance
public double getTagDistanceTolerance() -
getBlueAlliancePerspectiveRotation
-
getRedAlliancePerspectiveRotation
-
getSteerGains
-
getDriveGains
-
getSteerClosedLoopOutput
-
getDriveClosedLoopOutput
-
getSlipCurrent
-
setSlipCurrent
-
getDriveInitialConfigs
-
getSteerInitialConfigs
-
getCanCoderInitialConfigs
-
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
-
setCanBus
-
getPigeonId
public int getPigeonId() -
getSteerInertia
public double getSteerInertia() -
getDriveInertia
public double getDriveInertia() -
getSteerFrictionVoltage
-
getDriveFrictionVoltage
-
getDrivetrainConstants
-
getConstantCreator
public SwerveModuleConstantsFactory<TalonFXConfiguration,TalonFXConfiguration, getConstantCreator()CANcoderConfiguration> -
getDrivebaseRadiusInches
public double getDrivebaseRadiusInches() -
getDrivebaseRadiusMeters
public double getDrivebaseRadiusMeters() -
getFrontLeftDriveMotorId
public int getFrontLeftDriveMotorId() -
getFrontLeftSteerMotorId
public int getFrontLeftSteerMotorId() -
getFrontLeftEncoderId
public int getFrontLeftEncoderId() -
getFrontLeftEncoderOffset
-
isFrontLeftSteerInverted
public boolean isFrontLeftSteerInverted() -
getFrontLeftXPos
-
getFrontLeftYPos
-
getFrontRightDriveMotorId
public int getFrontRightDriveMotorId() -
getFrontRightSteerMotorId
public int getFrontRightSteerMotorId() -
getFrontRightEncoderId
public int getFrontRightEncoderId() -
getFrontRightEncoderOffset
-
isFrontRightSteerInverted
public boolean isFrontRightSteerInverted() -
getFrontRightXPos
-
getFrontRightYPos
-
getBackLeftDriveMotorId
public int getBackLeftDriveMotorId() -
getBackLeftSteerMotorId
public int getBackLeftSteerMotorId() -
getBackLeftEncoderId
public int getBackLeftEncoderId() -
getBackLeftEncoderOffset
-
isBackLeftSteerInverted
public boolean isBackLeftSteerInverted() -
getBackLeftXPos
-
getBackLeftYPos
-
getBackRightDriveMotorId
public int getBackRightDriveMotorId() -
getBackRightSteerMotorId
public int getBackRightSteerMotorId() -
getBackRightEncoderId
public int getBackRightEncoderId() -
getBackRightEncoderOffset
-
isBackRightSteerInverted
public boolean isBackRightSteerInverted() -
getBackRightXPos
-
getBackRightYPos
-
getTargetHeading
public double getTargetHeading() -
setTargetHeading
public void setTargetHeading(double targetHeading) -
getFrontLeft
public SwerveModuleConstants<TalonFXConfiguration,TalonFXConfiguration, getFrontLeft()CANcoderConfiguration> -
getFrontRight
public SwerveModuleConstants<TalonFXConfiguration,TalonFXConfiguration, getFrontRight()CANcoderConfiguration> -
getBackLeft
public SwerveModuleConstants<TalonFXConfiguration,TalonFXConfiguration, getBackLeft()CANcoderConfiguration> -
getBackRight
public SwerveModuleConstants<TalonFXConfiguration,TalonFXConfiguration, getBackRight()CANcoderConfiguration>
-