Class SwerveSettings
java.lang.Object
frc.team_8840_lib.utils.controllers.swerve.SwerveSettings
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA list of settings for the Swerve Drive Specialties. -
Field Summary
FieldsModifier and TypeFieldDescriptiondoublebooleanbooleandoubledoublecom.revrobotics.CANSparkBase.IdleModebooleandoubledoubledoubledoubleedu.wpi.first.math.geometry.Rotation2dbooleanbooleandoubledoublecom.revrobotics.CANSparkBase.IdleModebooleanbooleanbooleandoubledouble -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.kinematics.SwerveDriveKinematicsReturns the kinematics for the swerve driveedu.wpi.first.math.geometry.Translation2d[]Returns the calculated positions of the modules with the given track width and wheel basedoubleGets the min speed for the drive motors using threshold as a percentage of max speed (0.01% by default)voidUpdates the kinematics with the new wheelbase and trackwidthdouble
-
Field Details
-
invertGyro
public boolean invertGyro -
trackWidth
-
wheelBase
-
wheelDiameter
public double wheelDiameter -
doManualConversion
public boolean doManualConversion -
driveGearRatio
public double driveGearRatio -
angleGearRatio
public double angleGearRatio -
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
-
drivePID
-
useCurrentLimits
public boolean useCurrentLimits -
driveCurrentLimit
-
turnCurrentLimit
-
secondaryDriveCurrentLimit
-
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
-