Correctly tuned swerves

This commit is contained in:
Lukas H 2026-03-02 18:50:31 -05:00
parent defa76eae0
commit 747fb0bc52
1 changed files with 16 additions and 16 deletions

View File

@ -33,7 +33,7 @@ public class DriveSubsystem extends TestableSubsystem {
driveSystem = swerveBuilder
.withCanbusName("Drive")
.withPigeonId(20)
.withPigeonId(1)
.withMaxLinearVelocity(3.0)
.withMaxAngularVelocity(Math.PI * 2)
.withSwerveModule(
@ -43,13 +43,13 @@ public class DriveSubsystem extends TestableSubsystem {
.withDriveKI(driveI)
.withDriveKD(driveD)
.withDriveKV(driveKV)
.withSteerMotorId(3)
.withSteerMotorId(11)
.withSteerKP(steerP)
.withSteerKI(steerI)
.withSteerKD(steerD)
.withSteerKV(steerKV)
.withSteerOffset(0.359375)
.withSteerEncoderId(10)
.withSteerOffset(-0.336426)
.withSteerEncoderId(13)
.withModuleLocation(new Translation2d(1, 1))
.withModuleName("Front Left")
.withGearRatio(8.14)
@ -57,19 +57,19 @@ public class DriveSubsystem extends TestableSubsystem {
.build())
.withSwerveModule(
swerveBuilder.new SwerveModuleBuilder()
.withDriveMotorId(5)
.withDriveMotorId(22)
.withDriveKP(driveP)
.withDriveKI(driveI)
.withDriveKD(driveD)
.withDriveKV(driveKV)
.withDriveInverted()
.withSteerMotorId(6)
.withSteerMotorId(21)
.withSteerKP(steerP)
.withSteerKI(steerI)
.withSteerKD(steerD)
.withSteerKV(steerKV)
.withSteerOffset(0.406494)
.withSteerEncoderId(1)
.withSteerOffset(0.108887)
.withSteerEncoderId(23)
.withModuleLocation(new Translation2d(1, -1))
.withModuleName("Front Right")
.withGearRatio(8.14)
@ -77,18 +77,18 @@ public class DriveSubsystem extends TestableSubsystem {
.build())
.withSwerveModule(
swerveBuilder.new SwerveModuleBuilder()
.withDriveMotorId(8)
.withDriveMotorId(32)
.withDriveKP(driveP)
.withDriveKI(driveI)
.withDriveKD(driveD)
.withDriveKV(driveKV)
.withSteerMotorId(2)
.withSteerMotorId(31)
.withSteerKP(steerP)
.withSteerKI(steerI)
.withSteerKD(steerD)
.withSteerKV(steerKV)
.withSteerOffset(0.211670)
.withSteerEncoderId(7)
.withSteerOffset(-0.492432)
.withSteerEncoderId(33)
.withModuleLocation(new Translation2d(-1, 1))
.withModuleName("Back Left")
.withGearRatio(8.14)
@ -96,19 +96,19 @@ public class DriveSubsystem extends TestableSubsystem {
.build())
.withSwerveModule(
swerveBuilder.new SwerveModuleBuilder()
.withDriveMotorId(9)
.withDriveMotorId(42)
.withDriveKP(driveP)
.withDriveKI(driveI)
.withDriveKD(driveD)
.withDriveKV(driveKV)
.withDriveInverted()
.withSteerMotorId(11)
.withSteerMotorId(41)
.withSteerKP(steerP)
.withSteerKI(steerI)
.withSteerKD(steerD)
.withSteerKV(steerKV)
.withSteerOffset(-0.235107)
.withSteerEncoderId(4)
.withSteerOffset(0.470215)
.withSteerEncoderId(43)
.withModuleLocation(new Translation2d(-1, -1))
.withModuleName("Back Right")
.withGearRatio(8.14)