From a2441e9bfc6eb2c2c239b8cbeb3a0a0e16c01856 Mon Sep 17 00:00:00 2001 From: Eason Zhang Date: Sat, 2 Mar 2024 13:57:53 +0800 Subject: [PATCH] feat(auto): Add auto paths --- src/main/deploy/pathplanner/autos/L A+B+C.auto | 2 +- src/main/deploy/pathplanner/paths/L - NA.path | 18 +++++++++--------- src/main/deploy/pathplanner/paths/N1-NA.path | 2 +- src/main/deploy/pathplanner/paths/N1-NC.path | 16 ++++++++-------- src/main/deploy/pathplanner/paths/N2-N1.path | 4 ++-- src/main/deploy/pathplanner/paths/NA - SA.path | 12 ++++++------ src/main/deploy/pathplanner/paths/NC-SC.path | 4 ++-- src/main/deploy/pathplanner/paths/S-N2.path | 4 ++-- src/main/deploy/pathplanner/paths/SA-NB.path | 18 +++++++++--------- src/main/java/net/ironpulse/Constants.java | 2 +- .../commands/autos/AutoShootCommand.java | 2 +- .../subsystems/indicator/IndicatorIO.java | 2 +- 12 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/L A+B+C.auto b/src/main/deploy/pathplanner/autos/L A+B+C.auto index bef25b9..acd177d 100644 --- a/src/main/deploy/pathplanner/autos/L A+B+C.auto +++ b/src/main/deploy/pathplanner/autos/L A+B+C.auto @@ -3,7 +3,7 @@ "startingPose": { "position": { "x": 0.71, - "y": 6.63 + "y": 6.69 }, "rotation": 60.0 }, diff --git a/src/main/deploy/pathplanner/paths/L - NA.path b/src/main/deploy/pathplanner/paths/L - NA.path index 00561d6..15c6fd6 100644 --- a/src/main/deploy/pathplanner/paths/L - NA.path +++ b/src/main/deploy/pathplanner/paths/L - NA.path @@ -16,16 +16,16 @@ }, { "anchor": { - "x": 2.967562641007635, - "y": 7.7 + "x": 2.9279631351140876, + "y": 7.9259298417074 }, "prevControl": { - "x": 2.474995891168253, - "y": 7.663513574085972 + "x": 2.4353963852747054, + "y": 7.889443415793371 }, "nextControl": { - "x": 3.48592288287249, - "y": 7.738397054952952 + "x": 3.4463233769789428, + "y": 7.964326896660352 }, "isLocked": false, "linkedName": null @@ -33,11 +33,11 @@ { "anchor": { "x": 8.7, - "y": 7.8 + "y": 7.93 }, "prevControl": { "x": 8.081008072650242, - "y": 7.83751466226362 + "y": 7.9675146622636195 }, "nextControl": null, "isLocked": false, @@ -51,7 +51,7 @@ "rotateFast": false }, { - "waypointRelativePos": 0.55, + "waypointRelativePos": 0.5, "rotationDegrees": 15.0, "rotateFast": true }, diff --git a/src/main/deploy/pathplanner/paths/N1-NA.path b/src/main/deploy/pathplanner/paths/N1-NA.path index 6569e3c..9d70941 100644 --- a/src/main/deploy/pathplanner/paths/N1-NA.path +++ b/src/main/deploy/pathplanner/paths/N1-NA.path @@ -45,7 +45,7 @@ "reversed": false, "folder": "Blue Mid ", "previewStartingState": { - "rotation": 27.0, + "rotation": 28.0, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/pathplanner/paths/N1-NC.path b/src/main/deploy/pathplanner/paths/N1-NC.path index 0da776d..b939ca5 100644 --- a/src/main/deploy/pathplanner/paths/N1-NC.path +++ b/src/main/deploy/pathplanner/paths/N1-NC.path @@ -16,16 +16,16 @@ }, { "anchor": { - "x": 5.286573172131114, - "y": 4.383847630639424 + "x": 5.2699045499613835, + "y": 4.442187808233485 }, "prevControl": { - "x": 3.7237379288135686, - "y": 4.833846883579105 + "x": 3.7070693066438376, + "y": 4.892187061173167 }, "nextControl": { - "x": 6.159998632654571, - "y": 4.132355474691035 + "x": 6.14333001048484, + "y": 4.190695652285097 }, "isLocked": false, "linkedName": null @@ -33,11 +33,11 @@ { "anchor": { "x": 8.7, - "y": 4.18 + "y": 4.24 }, "prevControl": { "x": 7.6899999999999995, - "y": 4.18 + "y": 4.24 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/N2-N1.path b/src/main/deploy/pathplanner/paths/N2-N1.path index 494172f..2644a47 100644 --- a/src/main/deploy/pathplanner/paths/N2-N1.path +++ b/src/main/deploy/pathplanner/paths/N2-N1.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.91, + "x": 2.89, "y": 5.56 }, "prevControl": null, "nextControl": { - "x": 2.1344559159706558, + "x": 2.1144559159706557, "y": 5.551943103886209 }, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/NA - SA.path b/src/main/deploy/pathplanner/paths/NA - SA.path index c1760e8..67e23b5 100644 --- a/src/main/deploy/pathplanner/paths/NA - SA.path +++ b/src/main/deploy/pathplanner/paths/NA - SA.path @@ -4,24 +4,24 @@ { "anchor": { "x": 8.7, - "y": 7.8 + "y": 7.87 }, "prevControl": null, "nextControl": { "x": 8.975032265800573, - "y": 7.783331377830269 + "y": 7.853331377830269 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 4.2689118319413115, - "y": 6.892475267184037 + "x": 3.803065799024999, + "y": 6.717454734401855 }, "prevControl": { - "x": 4.457532593452396, - "y": 7.269716790206207 + "x": 3.9916865605360816, + "y": 7.094696257424025 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/NC-SC.path b/src/main/deploy/pathplanner/paths/NC-SC.path index 50ab820..d6e0583 100644 --- a/src/main/deploy/pathplanner/paths/NC-SC.path +++ b/src/main/deploy/pathplanner/paths/NC-SC.path @@ -4,12 +4,12 @@ { "anchor": { "x": 8.7, - "y": 4.18 + "y": 4.24 }, "prevControl": null, "nextControl": { "x": 7.549177337178205, - "y": 4.205053564224776 + "y": 4.265053564224776 }, "isLocked": false, "linkedName": null diff --git a/src/main/deploy/pathplanner/paths/S-N2.path b/src/main/deploy/pathplanner/paths/S-N2.path index eb64ce2..30440e5 100644 --- a/src/main/deploy/pathplanner/paths/S-N2.path +++ b/src/main/deploy/pathplanner/paths/S-N2.path @@ -16,11 +16,11 @@ }, { "anchor": { - "x": 2.894589789179579, + "x": 2.89, "y": 5.56 }, "prevControl": { - "x": 2.706031894019108, + "x": 2.701442104839529, "y": 5.56 }, "nextControl": null, diff --git a/src/main/deploy/pathplanner/paths/SA-NB.path b/src/main/deploy/pathplanner/paths/SA-NB.path index 7bfdda1..f139cbb 100644 --- a/src/main/deploy/pathplanner/paths/SA-NB.path +++ b/src/main/deploy/pathplanner/paths/SA-NB.path @@ -3,25 +3,25 @@ "waypoints": [ { "anchor": { - "x": 4.2689118319413115, - "y": 6.892475267184037 + "x": 3.8, + "y": 6.72 }, "prevControl": null, "nextControl": { - "x": 4.903194862227287, - "y": 6.450756779686148 + "x": 4.434283030285975, + "y": 6.278281512502111 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 8.278590851597945, - "y": 5.784011892896883 + "x": 8.4, + "y": 5.9 }, "prevControl": { - "x": 7.878543919524387, - "y": 5.600657049029834 + "x": 7.999953067926442, + "y": 5.716645156132952 }, "nextControl": null, "isLocked": false, @@ -45,7 +45,7 @@ "reversed": false, "folder": "Blue Left", "previewStartingState": { - "rotation": 27.0, + "rotation": 23.0, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/java/net/ironpulse/Constants.java b/src/main/java/net/ironpulse/Constants.java index ed4cb83..80fa8fe 100644 --- a/src/main/java/net/ironpulse/Constants.java +++ b/src/main/java/net/ironpulse/Constants.java @@ -219,7 +219,7 @@ public static class IndexerConstants { public static class IntakerConstants { public static final int INTAKE_MOTOR_ID = 30; - public static final Measure intakeVoltage = Volts.of(-7.5); + public static final Measure intakeVoltage = Volts.of(-8.5); } public static class ShooterConstants { diff --git a/src/main/java/net/ironpulse/commands/autos/AutoShootCommand.java b/src/main/java/net/ironpulse/commands/autos/AutoShootCommand.java index 7a7fccc..cdca8b9 100644 --- a/src/main/java/net/ironpulse/commands/autos/AutoShootCommand.java +++ b/src/main/java/net/ironpulse/commands/autos/AutoShootCommand.java @@ -14,5 +14,5 @@ public AutoShootCommand( new WaitCommand(0.8), // FIXME new AutoDeliverNoteCommand(indexerSubsystem, beamBreakSubsystem) ); - } + } } diff --git a/src/main/java/net/ironpulse/subsystems/indicator/IndicatorIO.java b/src/main/java/net/ironpulse/subsystems/indicator/IndicatorIO.java index bfabd2e..54a70b8 100644 --- a/src/main/java/net/ironpulse/subsystems/indicator/IndicatorIO.java +++ b/src/main/java/net/ironpulse/subsystems/indicator/IndicatorIO.java @@ -15,7 +15,7 @@ public interface IndicatorIO { */ enum Patterns { NORMAL(null), - FINISH_INTAKE(new BlinkingPattern(Color.kGreen, 0.1)), + FINISH_INTAKE(new BlinkingPattern(Color.kGreen, 0.05)), SHOOTING(new ScannerPattern(Color.kRed, 2)), // unused FINISH_SHOOT(new BlinkingPattern(Color.kRed, 0.5)), SHOULD_AMPLIFY(new RainbowPattern()),