]> git.taranathan.com Git - FRC2026.git/commitdiff
Tuned Turret (only kP and ffkV)
authorWesleyWong-972 <wesleycwong@gmail.com>
Sun, 19 Apr 2026 17:04:30 +0000 (10:04 -0700)
committerWesleyWong-972 <wesleycwong@gmail.com>
Sun, 19 Apr 2026 17:04:30 +0000 (10:04 -0700)
src/main/java/frc/robot/subsystems/turret/Turret.java
src/main/java/frc/robot/subsystems/turret/TurretConstants.java

index 550c95615f1014663681d594f1e46c7a581cb675..d595d5ee2fcf4414754688ac1a3cdcec2727059f 100644 (file)
@@ -75,10 +75,11 @@ public class Turret extends SubsystemBase implements TurretIO{
                TalonFXConfiguration config = new TalonFXConfiguration();
                config.MotorOutput.Inverted = InvertedValue.CounterClockwise_Positive;
     
-               config.Slot0.kP = 12.0; 
-               config.Slot0.kS = 0.1; // Static friction compensation
-               config.Slot0.kV = 0.12; // Adjusted kV for the gear ratio
+               config.Slot0.kP = 1.5;
+               config.Slot0.kS = 0.0; // Static friction compensation
+               config.Slot0.kV = 0.0; // Adjusted kV for the gear ratio
                config.Slot0.kD = 0.0; // The "Braking" term to stop overshoot
+               config.Slot0.kA = 0.0;
 
                var mm = config.MotionMagic;
                mm.MotionMagicCruiseVelocity = Units.radiansToRotations(TurretConstants.MAX_VELOCITY) * TurretConstants.GEAR_RATIO;
index f08df03e128da2304647e6d58b8f522ec95b60fd..bdd9eb2c6f670ac7e3f32f1815c18cbde31435e4 100644 (file)
@@ -24,7 +24,8 @@ public class TurretConstants {
 
        public static final double EXTRAPOLATION_TIME_CONSTANT = 0.06;
 
-       public static final double FEEDFORWARD_KV = 0.06;
+       public static final double FEEDFORWARD_KV = 0.02
+    ;
 
     public static final double NORMAL_CURRENT_LIMIT = 40.0; // A
     public static final double CALIBRATION_CURRENT_LIMIT = 10.0; // A