diff --git a/build.gradle b/build.gradle index 90939e1e..5723b354 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,10 @@ final String STUYLIB_VERSION = 'v2024.1.4' def ROBOT_MAIN_CLASS = "com.stuypulse.robot.Main" -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 +java { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 +} // Define my targets (RoboRIO) and artifacts (deployable files) // This is added by GradleRIO's backing project DeployUtils. diff --git a/src/main/java/com/stuypulse/robot/RobotContainer.java b/src/main/java/com/stuypulse/robot/RobotContainer.java index 6e2b86a7..2427ab05 100644 --- a/src/main/java/com/stuypulse/robot/RobotContainer.java +++ b/src/main/java/com/stuypulse/robot/RobotContainer.java @@ -5,6 +5,7 @@ package com.stuypulse.robot; +import com.pathplanner.lib.auto.AutoBuilder; import com.stuypulse.robot.commands.*; import com.stuypulse.robot.commands.amper.*; import com.stuypulse.robot.commands.auton.*; @@ -39,7 +40,7 @@ public class RobotContainer { public final Gamepad driver = new AutoGamepad(Ports.Gamepad.DRIVER); public final Gamepad operator = new AutoGamepad(Ports.Gamepad.OPERATOR); - // Subsystem + // Subsystems public final AprilTagVision vision = AprilTagVision.getInstance(); public final NoteVision noteVision = NoteVision.getInstance(); public final Odometry odometry = Odometry.getInstance(); @@ -52,12 +53,14 @@ public class RobotContainer { public final SwerveDrive swerve = SwerveDrive.getInstance(); // Autons - private static SendableChooser autonChooser = new SendableChooser<>(); - - // Robot container + private static SendableChooser autonChooser; + // RobotContainer public RobotContainer() { + swerve.configureAutoBuilder(); + configureDefaultCommands(); + configureNamedCommands(); configureButtonBindings(); configureAutons(); } @@ -70,6 +73,12 @@ private void configureDefaultCommands() { swerve.setDefaultCommand(new SwerveDriveDrive(driver)); } + /**********************/ + /*** NAMED COMMANDS ***/ + /**********************/ + + private void configureNamedCommands() {} + /***************/ /*** BUTTONS ***/ /***************/ @@ -85,7 +94,7 @@ private void configureButtonBindings() { /**************/ public void configureAutons() { - autonChooser.setDefaultOption("Do Nothing", new DoNothingAuton()); + autonChooser = AutoBuilder.buildAutoChooser(); SmartDashboard.putData("Autonomous", autonChooser); } diff --git a/src/main/java/com/stuypulse/robot/constants/Cameras.java b/src/main/java/com/stuypulse/robot/constants/Cameras.java index ee596e99..12cdadf1 100644 --- a/src/main/java/com/stuypulse/robot/constants/Cameras.java +++ b/src/main/java/com/stuypulse/robot/constants/Cameras.java @@ -27,7 +27,8 @@ public interface Limelight { public CameraConfig[] APRILTAG_CAMERAS = new CameraConfig[] { new CameraConfig("samera0", new Pose3d(new Translation3d(), new Rotation3d())), - new CameraConfig("samera1", new Pose3d(new Translation3d(), new Rotation3d())) + new CameraConfig("samera1", new Pose3d(new Translation3d(), new Rotation3d())), + new CameraConfig("samera2", new Pose3d(new Translation3d(), new Rotation3d())), }; public static class CameraConfig { diff --git a/src/main/java/com/stuypulse/robot/constants/Field.java b/src/main/java/com/stuypulse/robot/constants/Field.java index f7846709..4e9e1fc6 100644 --- a/src/main/java/com/stuypulse/robot/constants/Field.java +++ b/src/main/java/com/stuypulse/robot/constants/Field.java @@ -17,6 +17,9 @@ */ public interface Field { + double WIDTH = Units.inchesToMeters(323.25); + double LENGTH = Units.inchesToMeters(651.25); + double NOTE_LENGTH = Units.inchesToMeters(14.0); /*** APRILTAGS ***/ diff --git a/src/main/java/com/stuypulse/robot/subsystems/.gitkeep b/src/main/java/com/stuypulse/robot/subsystems/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/com/stuypulse/robot/util/.gitkeep b/src/main/java/com/stuypulse/robot/util/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendordeps/PathplannerLib.json b/vendordeps/PathplannerLib.json index 0bf11fbf..cae13633 100644 --- a/vendordeps/PathplannerLib.json +++ b/vendordeps/PathplannerLib.json @@ -1,7 +1,7 @@ { "fileName": "PathplannerLib.json", "name": "PathplannerLib", - "version": "2024.1.4", + "version": "2024.1.6", "uuid": "1b42324f-17c6-4875-8e77-1c312bc8c786", "frcYear": "2024", "mavenUrls": [ @@ -12,7 +12,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-java", - "version": "2024.1.4" + "version": "2024.1.6" } ], "jniDependencies": [], @@ -20,7 +20,7 @@ { "groupId": "com.pathplanner.lib", "artifactId": "PathplannerLib-cpp", - "version": "2024.1.4", + "version": "2024.1.6", "libName": "PathplannerLib", "headerClassifier": "headers", "sharedLibrary": false, diff --git a/vendordeps/photonlib.json b/vendordeps/photonlib.json index 282cfa89..8e1b780b 100644 --- a/vendordeps/photonlib.json +++ b/vendordeps/photonlib.json @@ -1,7 +1,7 @@ { "fileName": "photonlib.json", "name": "photonlib", - "version": "v2024.2.0", + "version": "v2024.2.2", "uuid": "515fe07e-bfc6-11fa-b3de-0242ac130004", "frcYear": "2024", "mavenUrls": [ @@ -14,7 +14,7 @@ { "groupId": "org.photonvision", "artifactId": "photonlib-cpp", - "version": "v2024.2.0", + "version": "v2024.2.2", "libName": "photonlib", "headerClassifier": "headers", "sharedLibrary": true, @@ -29,7 +29,7 @@ { "groupId": "org.photonvision", "artifactId": "photontargeting-cpp", - "version": "v2024.2.0", + "version": "v2024.2.2", "libName": "photontargeting", "headerClassifier": "headers", "sharedLibrary": true, @@ -46,12 +46,12 @@ { "groupId": "org.photonvision", "artifactId": "photonlib-java", - "version": "v2024.2.0" + "version": "v2024.2.2" }, { "groupId": "org.photonvision", "artifactId": "photontargeting-java", - "version": "v2024.2.0" + "version": "v2024.2.2" } ] } \ No newline at end of file