From 9f1daae74e8818bbbd10087ffbf9430aadd602fc Mon Sep 17 00:00:00 2001 From: nharnwal Date: Sun, 11 Feb 2024 11:54:27 -0500 Subject: [PATCH] Combine sim and real PID --- src/main/java/frc/robot/subsystems/drive/Drive.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/drive/Drive.java b/src/main/java/frc/robot/subsystems/drive/Drive.java index 05cc9cc5..86cc7866 100644 --- a/src/main/java/frc/robot/subsystems/drive/Drive.java +++ b/src/main/java/frc/robot/subsystems/drive/Drive.java @@ -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(); @@ -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,