From 694c3608656c095c852290ca363c96cdd7b3d389 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Apr 2026 10:08:34 -0700 Subject: [PATCH 1/6] first pass --- src/main/java/frc/robot/RobotContainer.java | 2 + .../robot/commands/robot/RobotCommands.java | 26 +++++++ .../subsystems/shooter/ShooterConstants.java | 68 +++++++++---------- 3 files changed, 60 insertions(+), 36 deletions(-) diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 09a39b0..31a44b0 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -302,6 +302,8 @@ private void configureBindings() { // While the right trigger is held, we will shoot into the hub or ferry. Binding A to the shaking of the shooter. gamepad_.rightTrigger().or(operatorGamepad_.rightTrigger()) .whileTrue(RobotCommands.shoot(shooter_, hopper_, intake_, drivebase_)); + + gamepad_.a().whileTrue(RobotCommands.shootHubInCorner(shooter_, hopper_, intake_, drivebase_)); // When the shooter isnt shooting, get it ready to shoot. shooter_.setDefaultCommand(shooter_.spinUpVelocityCommand(() -> { diff --git a/src/main/java/frc/robot/commands/robot/RobotCommands.java b/src/main/java/frc/robot/commands/robot/RobotCommands.java index 095ce21..71b9f79 100644 --- a/src/main/java/frc/robot/commands/robot/RobotCommands.java +++ b/src/main/java/frc/robot/commands/robot/RobotCommands.java @@ -1,6 +1,8 @@ package frc.robot.commands.robot; import static edu.wpi.first.units.Units.Meters; +import static edu.wpi.first.units.Units.MetersPerSecond; +import static edu.wpi.first.units.Units.MetersPerSecondPerSecond; import java.util.Set; import java.util.function.BooleanSupplier; @@ -8,6 +10,7 @@ import org.littletonrobotics.junction.Logger; +import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.units.measure.Distance; @@ -52,6 +55,29 @@ public static Command shootHub(Shooter shooter, Hopper hopper, IntakeSubsystem i ); } + public static Command shootHubInCorner(Shooter shooter, Hopper hopper, IntakeSubsystem intake, Drive drive) { + Supplier cornerPose = () -> { + Pose2d rightTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerDepot + : ShooterConstants.Positions.redCornerOutpost; + + Pose2d leftTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerDepot + : ShooterConstants.Positions.redCornerOutpost; + + Pose2d target = + drive.getPose().getY() < ShooterConstants.Positions.centerLineY + ? rightTarget + : leftTarget; + return target; + }; + + return DriveCommands.simplePathCommand(drive, cornerPose.get(), MetersPerSecond.of(3.0), MetersPerSecondPerSecond.of(3.0)) + .andThen(shootHub(shooter, hopper, intake, drive)); + } + /** * Shoots into the hub, without aiming. This should not be used in most situations, * and only when you need additional flexibility like trying to squeeze diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java index 2dcc17a..2d370de 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java @@ -2,10 +2,13 @@ import static edu.wpi.first.units.Units.Amps; import static edu.wpi.first.units.Units.Degrees; +import static edu.wpi.first.units.Units.Inches; import static edu.wpi.first.units.Units.Meters; import static edu.wpi.first.units.Units.RotationsPerSecond; import static edu.wpi.first.units.Units.Seconds; +import edu.wpi.first.math.geometry.Pose2d; +import edu.wpi.first.math.geometry.Rotation2d; import edu.wpi.first.math.geometry.Translation2d; import edu.wpi.first.units.measure.Angle; import edu.wpi.first.units.measure.AngularVelocity; @@ -49,11 +52,6 @@ public class ShooterConstants { public static final Angle hoodMaxAngle = Degrees.of(75.0) ; public static final Angle hoodMinAngle = Degrees.of(0.0) ; - public class FerryPositions{ - public static final Translation2d blueOutpostTarget= new Translation2d(2.135, 1.639); - public static final Translation2d redOutpostTarget= new Translation2d(14.0,6.0); - } - public class PID { // shooter public static final double shooterkP = 0.5; @@ -63,50 +61,48 @@ public class PID { public static final double shooterkA = 0.0; public static final double shooterkG = 0.0; public static final double shooterkS = 0.0; - } + } - public class MotionMagic { + public class MotionMagic { - // shooter - public static final double shooterkMaxVelocity = 1000.0; - public static final double shooterkMaxAcceleration = 3000.0; - public static final double shooterkJerk = 0.0; - } + // shooter + public static final double shooterkMaxVelocity = 1000.0; + public static final double shooterkMaxAcceleration = 3000.0; + public static final double shooterkJerk = 0.0; + } - public class SoftwareLimits { - public static final double hoodMaxAngle = 0.0; - public static final double hoodMinAngle = 0.0; - } + public class SoftwareLimits { + public static final double hoodMaxAngle = 0.0; + public static final double hoodMinAngle = 0.0; + } + + public class Positions { + // Field Positions + public static final Translation2d blueHubPose = new Translation2d(4.5974,4.034536); + public static final Translation2d redHubPose = new Translation2d(11.938,4.034536); - public class Positions { - // Field Positions - public static final Translation2d blueHubPose = new Translation2d(4.5974,4.034536); - public static final Translation2d redHubPose = new Translation2d(11.938,4.034536); + public static final Distance allianceZone = Meters.of(4.5974); + public static final Distance spinUpZone = Meters.of(6.0); - public static final Distance allianceZone = Meters.of(4.5974); - public static final Distance spinUpZone = Meters.of(6.0); + public static final Distance blueAllianceWall = Meters.of(0); + public static final Distance redAllianceWall = Meters.of(FieldConstants.layout.getFieldLength()); - public static final Distance blueAllianceWall = Meters.of(0); - public static final Distance redAllianceWall = Meters.of(FieldConstants.layout.getFieldLength()); + public static final Translation2d blueTargetLeft = new Translation2d(2,6); + public static final Translation2d blueTargetRight = new Translation2d(2,2); - public static final Translation2d blueTargetLeft = new Translation2d(2,6); - public static final Translation2d blueTargetRight = new Translation2d(2,2); + public static final Translation2d redTargetLeft = new Translation2d(14,6); + public static final Translation2d redTargetRight = new Translation2d(14,2); - public static final Translation2d redTargetLeft = new Translation2d(14,6); - public static final Translation2d redTargetRight = new Translation2d(14,2); + public static final double centerLineY = 4.034536; - public static final double centerLineY = 4.034536; + public static final Pose2d blueCornerDepot = new Pose2d(Inches.of(23.09), Inches.of(23.429), new Rotation2d(Degrees.of(-40.417))); + public static final Pose2d blueCornerOutpost = new Pose2d(Inches.of(23.09), Inches.of(294.261), new Rotation2d(Degrees.of(40.417))); + public static final Pose2d redCornerDepot = new Pose2d(Inches.of(628.13), Inches.of(23.429), new Rotation2d(Degrees.of(180.0 - 40.417))); + public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(-180.0 + 40.417))); } public class HoodPWMs { public static final int hoodLeftPWMPort = 2; public static final int hoodRightPWMPort = 0; } - - public class ferryPositions{ - public static final Translation2d blueOutpostFerryTarget= new Translation2d(2.136,1.935); //ferry target for the blue outpost - public static final Translation2d redOutpostFerryTarget= new Translation2d(14.0,6.0); //ferry target for the red outpost - public static final Translation2d blueDepotFerryTarget= new Translation2d(2.0,6.0); //ferry target for the blue depot - public static final Translation2d redDepotFerryTarget= new Translation2d(14.0,2.0); //ferry target for the red depot - } } From 4703c51cceaa0be9581bd3684bc28ffbd0d14377 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Apr 2026 10:59:49 -0700 Subject: [PATCH 2/6] fixed rotations --- src/main/java/frc/robot/Constants.java | 2 +- .../frc/robot/subsystems/shooter/ShooterConstants.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index 2d1dd1b..ba77933 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.COMPETITION; + private static final RobotType robotType = RobotType.SIMBOT; public static final boolean spawnLessFuelInSim = true; diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java index 2d370de..a9aa38b 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java @@ -95,10 +95,10 @@ public class Positions { public static final double centerLineY = 4.034536; - public static final Pose2d blueCornerDepot = new Pose2d(Inches.of(23.09), Inches.of(23.429), new Rotation2d(Degrees.of(-40.417))); - public static final Pose2d blueCornerOutpost = new Pose2d(Inches.of(23.09), Inches.of(294.261), new Rotation2d(Degrees.of(40.417))); - public static final Pose2d redCornerDepot = new Pose2d(Inches.of(628.13), Inches.of(23.429), new Rotation2d(Degrees.of(180.0 - 40.417))); - public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(-180.0 + 40.417))); + public static final Pose2d blueCornerDepot = new Pose2d(Inches.of(23.09), Inches.of(23.429), new Rotation2d(Degrees.of(40.417))); + public static final Pose2d blueCornerOutpost = new Pose2d(Inches.of(23.09), Inches.of(294.261), new Rotation2d(Degrees.of(-40.417))); + public static final Pose2d redCornerDepot = new Pose2d(Inches.of(628.13), Inches.of(23.429), new Rotation2d(Degrees.of(-180.0 + 40.417))); + public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(180.0 - 40.417))); } public class HoodPWMs { From 373b16acc8cb773a631270808cd5d168ca8db096 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Apr 2026 11:28:20 -0700 Subject: [PATCH 3/6] finished corner shot there is this weird like giggle it does at the waypoint but idk why that is happening. --- .../robot/commands/robot/RobotCommands.java | 56 +++++++++++++------ .../subsystems/shooter/ShooterConstants.java | 8 ++- 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/src/main/java/frc/robot/commands/robot/RobotCommands.java b/src/main/java/frc/robot/commands/robot/RobotCommands.java index 71b9f79..da95bbc 100644 --- a/src/main/java/frc/robot/commands/robot/RobotCommands.java +++ b/src/main/java/frc/robot/commands/robot/RobotCommands.java @@ -56,26 +56,46 @@ public static Command shootHub(Shooter shooter, Hopper hopper, IntakeSubsystem i } public static Command shootHubInCorner(Shooter shooter, Hopper hopper, IntakeSubsystem intake, Drive drive) { - Supplier cornerPose = () -> { - Pose2d rightTarget = - DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerDepot - : ShooterConstants.Positions.redCornerOutpost; - - Pose2d leftTarget = - DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerDepot - : ShooterConstants.Positions.redCornerOutpost; + return Commands.defer(() -> { + Supplier cornerPose = () -> { + Pose2d rightTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerOutpost + : ShooterConstants.Positions.redCornerDepot; + + Pose2d leftTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerDepot + : ShooterConstants.Positions.redCornerOutpost; + + Pose2d target = + drive.getPose().getY() < ShooterConstants.Positions.centerLineY + ? rightTarget + : leftTarget; + return target; + }; - Pose2d target = - drive.getPose().getY() < ShooterConstants.Positions.centerLineY - ? rightTarget - : leftTarget; - return target; - }; + Supplier immdPose = () -> { + Pose2d rightTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerOutpostWaypoint + : ShooterConstants.Positions.redCornerDepotWaypoint; + + Pose2d leftTarget = + DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue + ? ShooterConstants.Positions.blueCornerDepotWaypoint + : ShooterConstants.Positions.redCornerOutpostWaypoint; + + Pose2d target = + drive.getPose().getY() < ShooterConstants.Positions.centerLineY + ? rightTarget + : leftTarget; + return target; + }; - return DriveCommands.simplePathCommand(drive, cornerPose.get(), MetersPerSecond.of(3.0), MetersPerSecondPerSecond.of(3.0)) - .andThen(shootHub(shooter, hopper, intake, drive)); + return DriveCommands.simplePathCommand(drive, cornerPose.get(), immdPose.get(), MetersPerSecond.of(3.0), MetersPerSecondPerSecond.of(3.0)) + .andThen(shootHub(shooter, hopper, intake, drive)); + }, Set.of(shooter, hopper, intake, drive)); } /** diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java index a9aa38b..1c45d5a 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java @@ -96,9 +96,13 @@ public class Positions { public static final double centerLineY = 4.034536; public static final Pose2d blueCornerDepot = new Pose2d(Inches.of(23.09), Inches.of(23.429), new Rotation2d(Degrees.of(40.417))); + public static final Pose2d blueCornerDepotWaypoint = new Pose2d(Inches.of(34.511), Inches.of(33.155), new Rotation2d(Degrees.of(40.417))); public static final Pose2d blueCornerOutpost = new Pose2d(Inches.of(23.09), Inches.of(294.261), new Rotation2d(Degrees.of(-40.417))); - public static final Pose2d redCornerDepot = new Pose2d(Inches.of(628.13), Inches.of(23.429), new Rotation2d(Degrees.of(-180.0 + 40.417))); - public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(180.0 - 40.417))); + public static final Pose2d blueCornerOutpostWaypoint = new Pose2d(Inches.of(34.511), Inches.of(284.535), new Rotation2d(Degrees.of(-40.417))); + public static final Pose2d redCornerDepot = new Pose2d(Inches.of(628.13), Inches.of(23.429), new Rotation2d(Degrees.of(180.0 - 40.417))); + public static final Pose2d redCornerDepotWaypoint = new Pose2d(Inches.of(616.709), Inches.of(33.155), new Rotation2d(Degrees.of(180.0 - 40.417))); + public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(180.0 + 40.417))); + public static final Pose2d redCornerOutpostWaypoint = new Pose2d(Inches.of(616.709), Inches.of(284.535), new Rotation2d(Degrees.of(180.0 + 40.417))); } public class HoodPWMs { From 7a28ad8a6929b53d8e5d3d9dac25507dd8415e12 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 4 Apr 2026 11:44:03 -0700 Subject: [PATCH 4/6] revert sim --- src/main/java/frc/robot/Constants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index ba77933..2d1dd1b 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -36,7 +36,7 @@ public final class Constants { // Sets the currently running robot. Change to SIMBOT when running the // desktop physics simulation so AdvantageKit runs in SIM mode instead of // falling back to REPLAY. - private static final RobotType robotType = RobotType.SIMBOT; + private static final RobotType robotType = RobotType.COMPETITION; public static final boolean spawnLessFuelInSim = true; From 503b4ba5429c47494bb47c439e37f134b4a3a450 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 7 Apr 2026 09:41:36 -0700 Subject: [PATCH 5/6] Fixed in sim and added distance check --- .../robot/commands/robot/RobotCommands.java | 19 +++++++++++++------ .../subsystems/shooter/ShooterConstants.java | 2 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/main/java/frc/robot/commands/robot/RobotCommands.java b/src/main/java/frc/robot/commands/robot/RobotCommands.java index da95bbc..0918660 100644 --- a/src/main/java/frc/robot/commands/robot/RobotCommands.java +++ b/src/main/java/frc/robot/commands/robot/RobotCommands.java @@ -60,12 +60,12 @@ public static Command shootHubInCorner(Shooter shooter, Hopper hopper, IntakeSub Supplier cornerPose = () -> { Pose2d rightTarget = DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerOutpost + ? ShooterConstants.Positions.blueCornerDepot : ShooterConstants.Positions.redCornerDepot; Pose2d leftTarget = DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerDepot + ? ShooterConstants.Positions.blueCornerOutpost : ShooterConstants.Positions.redCornerOutpost; Pose2d target = @@ -78,12 +78,12 @@ public static Command shootHubInCorner(Shooter shooter, Hopper hopper, IntakeSub Supplier immdPose = () -> { Pose2d rightTarget = DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerOutpostWaypoint + ? ShooterConstants.Positions.blueCornerDepotWaypoint : ShooterConstants.Positions.redCornerDepotWaypoint; Pose2d leftTarget = DriverStation.getAlliance().orElse(Alliance.Blue) == Alliance.Blue - ? ShooterConstants.Positions.blueCornerDepotWaypoint + ? ShooterConstants.Positions.blueCornerOutpostWaypoint : ShooterConstants.Positions.redCornerOutpostWaypoint; Pose2d target = @@ -93,8 +93,15 @@ public static Command shootHubInCorner(Shooter shooter, Hopper hopper, IntakeSub return target; }; - return DriveCommands.simplePathCommand(drive, cornerPose.get(), immdPose.get(), MetersPerSecond.of(3.0), MetersPerSecondPerSecond.of(3.0)) - .andThen(shootHub(shooter, hopper, intake, drive)); + Logger.recordOutput("Shooter/CornerDriveTarget", cornerPose.get()); + + if(Meters.of(drive.getPose().getTranslation().getDistance(cornerPose.get().getTranslation())).lt(ShooterConstants.Positions.distFromCornerToShootInCorner)) { + return DriveCommands.simplePathCommand(drive, cornerPose.get(), immdPose.get(), MetersPerSecond.of(3.0), MetersPerSecondPerSecond.of(3.0)) + .andThen(shootHub(shooter, hopper, intake, drive)); + } + + return shootHub(shooter, hopper, intake, drive); + }, Set.of(shooter, hopper, intake, drive)); } diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java index 1c45d5a..0103171 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java @@ -103,6 +103,8 @@ public class Positions { public static final Pose2d redCornerDepotWaypoint = new Pose2d(Inches.of(616.709), Inches.of(33.155), new Rotation2d(Degrees.of(180.0 - 40.417))); public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(180.0 + 40.417))); public static final Pose2d redCornerOutpostWaypoint = new Pose2d(Inches.of(616.709), Inches.of(284.535), new Rotation2d(Degrees.of(180.0 + 40.417))); + + public static final Distance distFromCornerToShootInCorner = Meters.of(2); } public class HoodPWMs { From aa676b75dcfcba5afef7eb16688f180927d3b764 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Apr 2026 09:52:20 -0700 Subject: [PATCH 6/6] fix constants --- .../subsystems/shooter/ShooterConstants.java | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java index 8e3677e..d13f7ea 100644 --- a/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java +++ b/src/main/java/frc/robot/subsystems/shooter/ShooterConstants.java @@ -2,10 +2,10 @@ import static edu.wpi.first.units.Units.Amps; import static edu.wpi.first.units.Units.Degrees; -import static edu.wpi.first.units.Units.Inches; import static edu.wpi.first.units.Units.Meters; import static edu.wpi.first.units.Units.RotationsPerSecond; import static edu.wpi.first.units.Units.Seconds; +import static edu.wpi.first.units.Units.Inches; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Rotation2d; @@ -53,14 +53,14 @@ public class ShooterConstants { public static final Angle hoodMinAngle = Degrees.of(0.0) ; public class PID { - // shooter - public static final double shooterkP = 0.5; - public static final double shooterkI = 0.0; - public static final double shooterkD = 0.0; - public static final double shooterkV = 0.132; - public static final double shooterkA = 0.0; - public static final double shooterkG = 0.0; - public static final double shooterkS = 0.0; + // shooter + public static final double shooterkP = 0.5; + public static final double shooterkI = 0.0; + public static final double shooterkD = 0.0; + public static final double shooterkV = 0.132; + public static final double shooterkA = 0.0; + public static final double shooterkG = 0.0; + public static final double shooterkS = 0.0; } public class MotionMagic { @@ -82,16 +82,21 @@ public class Positions { public static final Translation2d redHubPose = new Translation2d(11.938,4.034536); public static final Distance allianceZone = Meters.of(4.5974); - public static final Distance spinUpZone = Meters.of(6.0); public static final Distance blueAllianceWall = Meters.of(0); public static final Distance redAllianceWall = Meters.of(FieldConstants.layout.getFieldLength()); - public static final Translation2d blueTargetLeft = new Translation2d(2,6); - public static final Translation2d blueTargetRight = new Translation2d(2,2); + public static final Translation2d blueTargetLeft = new Translation2d(1,6); + public static final Translation2d blueTargetRight = new Translation2d(1,2); + + public static final Translation2d redTargetLeft = new Translation2d(15,6); + public static final Translation2d redTargetRight = new Translation2d(15,2); - public static final Translation2d redTargetLeft = new Translation2d(14,6); - public static final Translation2d redTargetRight = new Translation2d(14,2); + public static final Translation2d blueBumpTargetLeft = new Translation2d(4, FieldConstants.layout.getFieldWidth() - 2.5); + public static final Translation2d blueBumpTargetRight = new Translation2d(4,2.5); + + public static final Translation2d redBumpTargetLeft = new Translation2d(FieldConstants.layout.getFieldLength() - 4, FieldConstants.layout.getFieldWidth() - 2.5); + public static final Translation2d redBumpTargetRight = new Translation2d(FieldConstants.layout.getFieldLength() - 4,2.5); public static final double centerLineY = 4.034536; @@ -104,13 +109,7 @@ public class Positions { public static final Pose2d redCornerOutpost = new Pose2d(Inches.of(628.13), Inches.of(294.261), new Rotation2d(Degrees.of(180.0 + 40.417))); public static final Pose2d redCornerOutpostWaypoint = new Pose2d(Inches.of(616.709), Inches.of(284.535), new Rotation2d(Degrees.of(180.0 + 40.417))); - public static final Translation2d blueBumpTargetLeft = new Translation2d(4, FieldConstants.layout.getFieldWidth() - 2.5); - public static final Translation2d blueBumpTargetRight = new Translation2d(4,2.5); - - public static final Translation2d redBumpTargetLeft = new Translation2d(FieldConstants.layout.getFieldLength() - 4, FieldConstants.layout.getFieldWidth() - 2.5); - public static final Translation2d redBumpTargetRight = new Translation2d(FieldConstants.layout.getFieldLength() - 4,2.5); - - public static final Distance distFromCornerToShootInCorner = Meters.of(2); + public static final Distance distFromCornerToShootInCorner = Meters.of(2.0); } public class HoodPWMs {