Skip to content

Commit

Permalink
Tune swerve PID
Browse files Browse the repository at this point in the history
  • Loading branch information
viggy96 committed Oct 25, 2024
1 parent 0ba8c92 commit 3f69d0c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/lasarobotics/drive/MAXSwerveModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ private GearRatio(double value) {
private static final double DRIVE_VELOCITY_kD = 0.001;
private static final double DRIVE_VELOCITY_kS = 0.2;
private static final double DRIVE_VELOCITY_kA = 0.5;
private static final double DRIVE_FF_MULTIPLIER = 1.3;
private static final double DRIVE_VELOCITY_TOLERANCE = 0.01;
private static final boolean DRIVE_VELOCITY_SENSOR_PHASE = false;
private static final boolean DRIVE_INVERT_MOTOR = false;
Expand Down Expand Up @@ -219,7 +218,7 @@ public MAXSwerveModule(Hardware swerveHardware, ModuleLocation location, GearRat
DRIVE_VELOCITY_kP,
0.0,
DRIVE_VELOCITY_kD,
(1 / ((m_driveMotor.getKind().getMaxRPM() * DRIVETRAIN_EFFICIENCY / 60) * m_driveConversionFactor)) * DRIVE_FF_MULTIPLIER,
1 / ((m_driveMotor.getKind().getMaxRPM() * DRIVETRAIN_EFFICIENCY / 60) * m_driveConversionFactor),
0.0
),
DRIVE_VELOCITY_SENSOR_PHASE,
Expand Down

0 comments on commit 3f69d0c

Please sign in to comment.