From 471769af51b388e43829e0d20b930f1e54843a88 Mon Sep 17 00:00:00 2001 From: joelzoto <118407587+joelzoto@users.noreply.github.com> Date: Sat, 12 Apr 2025 16:05:54 -0400 Subject: [PATCH] auton tuning --- .../pathplanner/autos/Right_3.5_FDC.auto | 24 +++---------------- src/main/deploy/pathplanner/paths/C_Load.path | 18 +++++++------- src/main/deploy/pathplanner/paths/D_Load.path | 16 ++++++------- src/main/deploy/pathplanner/paths/F_Load.path | 14 +++++------ src/main/deploy/pathplanner/paths/I_Load.path | 16 ++++++------- src/main/deploy/pathplanner/paths/L_Load.path | 8 +++---- src/main/deploy/pathplanner/paths/Load_C.path | 16 ++++++------- src/main/deploy/pathplanner/paths/Load_D.path | 16 ++++++------- .../deploy/pathplanner/paths/Start_I.path | 8 +++---- .../java/frc/robot/driver/DriverXbox.java | 4 ++-- 10 files changed, 61 insertions(+), 79 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/Right_3.5_FDC.auto b/src/main/deploy/pathplanner/autos/Right_3.5_FDC.auto index e72d725..8c805d4 100644 --- a/src/main/deploy/pathplanner/autos/Right_3.5_FDC.auto +++ b/src/main/deploy/pathplanner/autos/Right_3.5_FDC.auto @@ -70,16 +70,10 @@ "name": "HPPickup" } }, - { - "type": "named", - "data": { - "name": "LineUpHPStationRight" - } - }, { "type": "wait", "data": { - "waitTime": 0.75 + "waitTime": 0.8 } } ] @@ -164,16 +158,10 @@ "name": "HPPickup" } }, - { - "type": "named", - "data": { - "name": "LineUpHPStationRight" - } - }, { "type": "wait", "data": { - "waitTime": 0.75 + "waitTime": 0.8 } } ] @@ -258,16 +246,10 @@ "name": "HPPickup" } }, - { - "type": "named", - "data": { - "name": "LineUpHPStationRight" - } - }, { "type": "wait", "data": { - "waitTime": 0.75 + "waitTime": 0.8 } } ] diff --git a/src/main/deploy/pathplanner/paths/C_Load.path b/src/main/deploy/pathplanner/paths/C_Load.path index 1238c4a..dcfbaa4 100644 --- a/src/main/deploy/pathplanner/paths/C_Load.path +++ b/src/main/deploy/pathplanner/paths/C_Load.path @@ -3,29 +3,29 @@ "waypoints": [ { "anchor": { - "x": 3.5483606557377048, - "y": 2.4725922131147535 + "x": 3.1785, + "y": 2.61125 }, "prevControl": null, "nextControl": { - "x": 2.0043549058803896, - "y": 2.2856309046410273 + "x": 1.4994485959043433, + "y": 2.4900073898447963 }, "isLocked": false, "linkedName": "C" }, { "anchor": { - "x": 1.41375, - "y": 1.0707499999999994 + "x": 1.7160000000000002, + "y": 0.8367499999999995 }, "prevControl": { - "x": 2.0678511728920146, - "y": 1.9413712747438887 + "x": 2.489738987988048, + "y": 1.614557420548854 }, "nextControl": null, "isLocked": false, - "linkedName": "RightLoad" + "linkedName": null } ], "rotationTargets": [], diff --git a/src/main/deploy/pathplanner/paths/D_Load.path b/src/main/deploy/pathplanner/paths/D_Load.path index 9078408..6c82646 100644 --- a/src/main/deploy/pathplanner/paths/D_Load.path +++ b/src/main/deploy/pathplanner/paths/D_Load.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 3.6202868852459016, - "y": 2.388678278688524 + "x": 3.471, + "y": 2.5429999999999997 }, "prevControl": null, "nextControl": { - "x": 1.8509583269127923, - "y": 2.046185727606702 + "x": 1.7016714416668908, + "y": 2.2005074489181777 }, "isLocked": false, "linkedName": "D" }, { "anchor": { - "x": 1.41375, - "y": 1.0707499999999994 + "x": 1.6769999999999998, + "y": 0.8367499999999995 }, "prevControl": { - "x": 2.277592483249231, - "y": 1.7782897067969352 + "x": 2.5408424832492305, + "y": 1.5442897067969352 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/F_Load.path b/src/main/deploy/pathplanner/paths/F_Load.path index 3463d6c..107ce52 100644 --- a/src/main/deploy/pathplanner/paths/F_Load.path +++ b/src/main/deploy/pathplanner/paths/F_Load.path @@ -8,24 +8,24 @@ }, "prevControl": null, "nextControl": { - "x": 4.781005953468027, - "y": 2.3453856263165553 + "x": 5.03061125192863, + "y": 2.4259981266462574 }, "isLocked": false, "linkedName": "F" }, { "anchor": { - "x": 1.41375, - "y": 1.0707499999999994 + "x": 1.7355, + "y": 0.8075 }, "prevControl": { - "x": 2.8896639125659895, - "y": 1.6652050077739282 + "x": 2.9366891626323035, + "y": 1.471976733921906 }, "nextControl": null, "isLocked": false, - "linkedName": "RightLoad" + "linkedName": null } ], "rotationTargets": [], diff --git a/src/main/deploy/pathplanner/paths/I_Load.path b/src/main/deploy/pathplanner/paths/I_Load.path index e9dd2e9..ef07186 100644 --- a/src/main/deploy/pathplanner/paths/I_Load.path +++ b/src/main/deploy/pathplanner/paths/I_Load.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 5.5672500000000005, - "y": 5.604500000000001 + "x": 5.5575, + "y": 5.38025 }, "prevControl": null, "nextControl": { - "x": 4.656518608927145, - "y": 5.9812761975423046 + "x": 4.700934999670552, + "y": 5.832404986292486 }, "isLocked": false, "linkedName": "I" }, { "anchor": { - "x": 1.6867500000000002, + "x": 1.7745, "y": 7.27175 }, "prevControl": { - "x": 3.2541074563055243, - "y": 6.578409511381681 + "x": 3.2662498409826606, + "y": 6.500815623557918 }, "nextControl": null, "isLocked": false, @@ -42,7 +42,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -54.293308599397086 + "rotation": -53.97262661489624 }, "reversed": false, "folder": "Left", diff --git a/src/main/deploy/pathplanner/paths/L_Load.path b/src/main/deploy/pathplanner/paths/L_Load.path index 217ff2b..f89793b 100644 --- a/src/main/deploy/pathplanner/paths/L_Load.path +++ b/src/main/deploy/pathplanner/paths/L_Load.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 1.7647500000000003, - "y": 6.99875 + "x": 1.8232499999999998, + "y": 7.07675 }, "prevControl": { - "x": 2.1830634369758912, - "y": 6.553028097353261 + "x": 2.2415634369758908, + "y": 6.63102809735326 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Load_C.path b/src/main/deploy/pathplanner/paths/Load_C.path index 741e189..d592d2e 100644 --- a/src/main/deploy/pathplanner/paths/Load_C.path +++ b/src/main/deploy/pathplanner/paths/Load_C.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 1.41375, - "y": 1.0707499999999994 + "x": 1.6769999999999998, + "y": 0.8367499999999995 }, "prevControl": null, "nextControl": { - "x": 1.8983041185724925, - "y": 1.7702061892263394 + "x": 2.2999380543998793, + "y": 1.8439969667333564 }, "isLocked": false, "linkedName": "RightLoad" }, { "anchor": { - "x": 3.5483606557377048, - "y": 2.4725922131147535 + "x": 3.1785, + "y": 2.61125 }, "prevControl": { - "x": 2.1155935941598862, - "y": 2.2624007664137196 + "x": 1.7938294045143734, + "y": 2.24923454838888 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Load_D.path b/src/main/deploy/pathplanner/paths/Load_D.path index 87a0d55..02b27a7 100644 --- a/src/main/deploy/pathplanner/paths/Load_D.path +++ b/src/main/deploy/pathplanner/paths/Load_D.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 1.41375, - "y": 1.0707499999999994 + "x": 1.6769999999999998, + "y": 0.8367499999999995 }, "prevControl": null, "nextControl": { - "x": 1.88702349243721, - "y": 1.1841297027883004 + "x": 2.285578590876466, + "y": 1.7988709699787229 }, "isLocked": false, "linkedName": "RightLoad" }, { "anchor": { - "x": 3.6202868852459016, - "y": 2.388678278688524 + "x": 3.471, + "y": 2.5429999999999997 }, "prevControl": { - "x": 1.9926534127600743, - "y": 2.1438672723736283 + "x": 2.0115509097009845, + "y": 2.0792668699484196 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/Start_I.path b/src/main/deploy/pathplanner/paths/Start_I.path index 9e03cc0..39be2b1 100644 --- a/src/main/deploy/pathplanner/paths/Start_I.path +++ b/src/main/deploy/pathplanner/paths/Start_I.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 5.5672500000000005, - "y": 5.604500000000001 + "x": 5.5575, + "y": 5.38025 }, "prevControl": { - "x": 6.2633439197057355, - "y": 5.827870866046262 + "x": 6.253593919705735, + "y": 5.603620866046262 }, "nextControl": null, "isLocked": false, diff --git a/src/main/java/frc/robot/driver/DriverXbox.java b/src/main/java/frc/robot/driver/DriverXbox.java index a3633be..e2900cc 100644 --- a/src/main/java/frc/robot/driver/DriverXbox.java +++ b/src/main/java/frc/robot/driver/DriverXbox.java @@ -283,8 +283,8 @@ public void setupTeleopButtons() { RushinatorWrist.kLastState == RushinatorWrist.State.kHPMid) ); - // controller.povUp().whileTrue(new AutoAlignHP(() -> HPStation.BLU_RIGHT_STATION.AprilTag)); - // controller.povDown().whileTrue(new AutoAlignHP(() -> HPStation.BLU_LEFT_STATION.AprilTag)); + controller.povUp().onTrue(new AutoAlignHP(() -> HPStation.BLU_RIGHT_STATION.AprilTag)); + controller.povDown().onTrue(new AutoAlignHP(() -> HPStation.BLU_LEFT_STATION.AprilTag)); //Align to Reef // controller.povLeft().whileTrue(new DriveToPoseCommand(