Skip to content

Commit

Permalink
Combine sim and real PID
Browse files Browse the repository at this point in the history
  • Loading branch information
harnwalN committed Feb 11, 2024
1 parent dc102bf commit 9f1daae
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/main/java/frc/robot/subsystems/drive/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Drive extends SubsystemBase {

private static final double rKS = Constants.currentMode == SIM ? 0.0 : 0.88676;
private static final double rKV = Constants.currentMode == SIM ? 0.227 : 32.08170;
private PIDController pid;
public PIDController pid = new PIDController(7, 0, 0);
private final DriveIO io;
private final GyroIO gyroIO;
private final DriveIOInputsAutoLogged inputs = new DriveIOInputsAutoLogged();
Expand All @@ -64,13 +64,6 @@ public Drive(DriveIO io, GyroIO gyroIO) {
this.io = io;
this.gyroIO = gyroIO;

// different PID tuning for SIM
if (Constants.currentMode == SIM) {
pid = new PIDController(5, 0, 0); // if SIM
} else {
pid = new PIDController(10, 0, 0); // if Kitbot
}

AutoBuilder.configureRamsete(
this::getPose,
this::setPose,
Expand Down

0 comments on commit 9f1daae

Please sign in to comment.