]> git.taranathan.com Git - FRC2026.git/commitdiff
fixes
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Wed, 18 Feb 2026 21:05:17 +0000 (13:05 -0800)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Wed, 18 Feb 2026 21:05:17 +0000 (13:05 -0800)
src/main/java/frc/robot/commands/gpm/AutoShootCommand.java
src/main/java/frc/robot/constants/FieldConstants.java
src/main/java/frc/robot/controls/PS5ControllerDriverConfig.java
src/main/java/frc/robot/subsystems/turret/ShotInterpolation.java

index d13d91ab1d66ccf266396c2aac97d503c8136833..90f5c8a5880f2de5e83166d0d2bb30c03546b460 100644 (file)
@@ -189,7 +189,6 @@ public class AutoShootCommand extends Command {
         SmartDashboard.putNumber("Turret Calculated Setpoint", turretSetpoint);
         SmartDashboard.putNumber("Hood Calculate Setpoint", hoodSetpoint);
         SmartDashboard.putNumber("Shooter Calculate Velocity", goalState.exitVel());
-        System.out.println("COMMAND IS WORKINNGGG");
 
         /** Spindexer Stuff!! */
         if(spindexer != null){
index a5ec1db889b92f384e7055638678720ce5410d0a..8a4924cf094fe89474d6a1fb34cc9334b6069c58 100644 (file)
@@ -24,10 +24,10 @@ public class FieldConstants {
 
   /** Location of hub target */
   public static final Translation3d HUB_BLUE =
-      new Translation3d(Units.inchesToMeters(156.8 + 20), 4.035, Units.inchesToMeters(72));
+      new Translation3d(Units.inchesToMeters(156.8 + 20), FIELD_WIDTH/2, Units.inchesToMeters(72));
   
   public static final Translation3d HUB_RED =
-      new Translation3d(FIELD_LENGTH - Units.inchesToMeters(156.8 + 20), 4.035 + .67, Units.inchesToMeters(72));
+      new Translation3d(FIELD_LENGTH - Units.inchesToMeters(156.8 - 20), FIELD_WIDTH/2, Units.inchesToMeters(72));
     
   public static final Translation3d NEUTRAL_LEFT =
     new Translation3d(FIELD_LENGTH/2, LEFT_SIDE_TARGET, 0);
@@ -36,10 +36,10 @@ public class FieldConstants {
     new Translation3d(FIELD_LENGTH/2, RIGHT_SIDE_TARGET, 0);
 
   public static final Translation3d ALLIANCE_LEFT_BLUE =
-    new Translation3d(BLUE_BORDER + 5, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
+    new Translation3d(BLUE_BORDER - 5, LEFT_SIDE_TARGET, 0); // previous hub + a few feet further back
 
   public static final Translation3d ALLIANCE_RIGHT_BLUE =
-    new Translation3d(BLUE_BORDER + 5, RIGHT_SIDE_TARGET, 0);
+    new Translation3d(BLUE_BORDER - 5, RIGHT_SIDE_TARGET, 0);
 
 
   public static final Translation3d ALLIANCE_LEFT_RED =
@@ -48,6 +48,12 @@ public class FieldConstants {
   public static final Translation3d ALLIANCE_RIGHT_RED =
     new Translation3d(RED_BORDER + 5, RIGHT_SIDE_TARGET, 0);
 
+  public static final Translation3d ALLIANCE_CENTER_BLUE =
+    new Translation3d(BLUE_BORDER - 5, FIELD_WIDTH/2, 0);
+  
+  public static final Translation3d ALLIANCE_CENTER_RED =
+    new Translation3d(RED_BORDER + 5, FIELD_WIDTH/2, 0);
+
   public static final double BLUE_ALLIANCE_LINE = BLUE_BORDER; // That's the distance from one side to the blue bump
   public static final double RED_ALLIANCE_LINE = RED_BORDER; // 
 
@@ -81,7 +87,7 @@ public class FieldConstants {
     }
   }
 
-  public static Translation3d getAllianceTranslation(boolean sideLeft) {
+  public static Translation3d getAllianceSideTranslation(boolean sideLeft) {
     if (sideLeft) {
       if (Robot.getAlliance() == Alliance.Blue) {
         return ALLIANCE_LEFT_BLUE;
@@ -97,6 +103,14 @@ public class FieldConstants {
     }
   }
 
+  public static Translation3d getAllianceCenterTranslation() {
+    if (Robot.getAlliance() == Alliance.Blue) {
+      return ALLIANCE_CENTER_BLUE;
+    } else {
+      return ALLIANCE_CENTER_RED;
+    }
+  }
+
   public static FieldZone getZone(Translation2d drivepose) {
     double x = drivepose.getX();
     //double y = drivepose.getY();
index 75daa516f34fdf3263a41ce4e5cf9334dedf1147..661c053e02d97ee2d238d89a02e1d39ddf08de62 100644 (file)
@@ -77,6 +77,7 @@ public class PS5ControllerDriverConfig extends BaseDriverConfig {
                 else{
                     intake.retract();
                     intake.spinStop();
+                    intakeBoolean = true;
                 }
             }));
         }
index 67486bd39c51b196d3cc956d6fe23411e41b5a66..98398e1a9625ede0c18149f28c0ed2b1f437670c 100644 (file)
@@ -20,6 +20,7 @@ public class ShotInterpolation {
         hoodAngleMap.put(0.0, Units.degreesToRadians(90));
         hoodAngleMap.put(1.0, Units.degreesToRadians(90));
 
+        //TODO: find actual values from video motion
         exitVelocityMap.put(1.0, 2.0);
         exitVelocityMap.put(2.0, 4.0);
     }