]> git.taranathan.com Git - FRC2026.git/commitdiff
fix shuttling
authoriefomit <timofei.stem@gmail.com>
Sun, 29 Mar 2026 00:07:47 +0000 (17:07 -0700)
committeriefomit <timofei.stem@gmail.com>
Sun, 29 Mar 2026 00:07:47 +0000 (17:07 -0700)
src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/constants/ShuttleInterpolation.java

index 1c47ac0991e79411944a89f3f8e5eaf98bacea0e..afcd616074daa01f72feeadefa352601369750c3 100644 (file)
@@ -221,7 +221,7 @@ public class Superstructure extends Command {
         } else {
             turret.setFieldRelativeTarget(Rotation2d.fromDegrees(turretSetpoint), turretVelocity - drivetrain.getAngularRate(2));
 
-            boolean shuttling = target != FieldConstants.getHubTranslation().toTranslation2d(); // if we're aiming at the hub, we're not shuttling
+            boolean shuttling = !target.equals(FieldConstants.getHubTranslation().toTranslation2d()); // if we're aiming at the hub, we're not shuttling
 
             // shuttling will move the hood so its angles very close to max (less arch)
             if (shuttling) {
index cf270adeee3a0fc0105278295c732ba765c7b282..a2ec911c5ca10de95aa3e91212cb3a448798ff5e 100644 (file)
@@ -18,26 +18,14 @@ public class ShuttleInterpolation {
     static {
         // we can be less aggressive: y = 0.65 * (1.34959x + 9.79618)
         // will likely be this that requires tuning.
-        shooterVelocityMap.put(0.0, 6.2075);
-        shooterVelocityMap.put(1.00, 7.475);
-        shooterVelocityMap.put(1.49, 7.475);
-        shooterVelocityMap.put(2.09, 8.125);
-        shooterVelocityMap.put(2.95, 8.775);
-        shooterVelocityMap.put(4.07, 10.075);
-        shooterVelocityMap.put(5.05, 10.855);
-        shooterVelocityMap.put(5.79, 11.7);
-        shooterVelocityMap.put(25.0, 28.236);
+        shooterVelocityMap.put(0.0, 9.0);
+        shooterVelocityMap.put(4.0, 12.8);
+        shooterVelocityMap.put(7.6, 19.0);
+
 
         // always shoot at low angle to ground.
-        newHoodMap.put(0.0, 80.0);
-        newHoodMap.put(1.00, 80.0);
-        newHoodMap.put(1.49, 80.0);
-        newHoodMap.put(2.09, 80.0);
-        newHoodMap.put(2.95, 80.0);
-        newHoodMap.put(5.05, 80.0);
-        newHoodMap.put(5.79, 80.0);
-        newHoodMap.put(4.07, 80.0);
-        newHoodMap.put(27.99, 80.0);
+        newHoodMap.put(0.0, 60.0);
+        newHoodMap.put(27.99, 60.0);
     }
 
 }