From 3d218983fe8ab83711e4264ff6f493171646cd5f Mon Sep 17 00:00:00 2001 From: iefomit Date: Sat, 28 Mar 2026 17:07:47 -0700 Subject: [PATCH] fix shuttling --- .../robot/commands/gpm/Superstructure.java | 2 +- .../robot/constants/ShuttleInterpolation.java | 24 +++++-------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/main/java/frc/robot/commands/gpm/Superstructure.java b/src/main/java/frc/robot/commands/gpm/Superstructure.java index 1c47ac0..afcd616 100644 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@ -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) { diff --git a/src/main/java/frc/robot/constants/ShuttleInterpolation.java b/src/main/java/frc/robot/constants/ShuttleInterpolation.java index cf270ad..a2ec911 100644 --- a/src/main/java/frc/robot/constants/ShuttleInterpolation.java +++ b/src/main/java/frc/robot/constants/ShuttleInterpolation.java @@ -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); } } -- 2.39.5