From 121c1eb16012cb278de95b8ac3ac8fe1c6c69d8d Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sat, 2 Mar 2024 09:51:39 -0800 Subject: [PATCH 1/7] 1 score paths --- .../autos/PresetAmpSide1Score.auto | 25 +++++++++ .../pathplanner/autos/PresetMid1Score.auto | 25 +++++++++ .../autos/PresetSourceSide1Score.auto | 31 +++++++++++ .../paths/LowSpeakerPassAutoLine.path | 52 +++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto create mode 100644 src/main/deploy/pathplanner/autos/PresetMid1Score.auto create mode 100644 src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto create mode 100644 src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path diff --git a/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto new file mode 100644 index 00000000..6fa131e5 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 4.47 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetMid1Score.auto b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto new file mode 100644 index 00000000..6fa131e5 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 4.47 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto new file mode 100644 index 00000000..0aef4b66 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto @@ -0,0 +1,31 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 4.47 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "LowSpeakerPassAutoLine" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path new file mode 100644 index 00000000..04351df3 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path @@ -0,0 +1,52 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 4.46 + }, + "prevControl": null, + "nextControl": { + "x": 1.4844248215812361, + "y": 3.197920695128801 + }, + "isLocked": false, + "linkedName": "LowSpeaker" + }, + { + "anchor": { + "x": 3.24913105883219, + "y": 1.4722134907452726 + }, + "prevControl": { + "x": 1.9914122488577533, + "y": 2.1936955987926234 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 120.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 120.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file From 5f7bc287a319cf3c53bf3d70d74051b7e1c26cb8 Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sat, 2 Mar 2024 14:23:06 -0800 Subject: [PATCH 2/7] path adjustments + set angle command fix + back left module correction --- .../autos/PresetAmpSide1Score.auto | 4 +- .../pathplanner/autos/PresetMid1Score.auto | 6 +-- .../autos/PresetMidAutoline2Score.auto | 12 ----- .../autos/PresetMidAutoline3Score.auto | 49 +++++++++++++++++++ .../autos/PresetSourceSide1Score.auto | 2 +- .../pathplanner/paths/LowPassAutoLine.path | 4 +- .../practiceswerve/modules/backleft.json | 2 +- .../commands/launcher/SetAngleCommand.java | 9 +++- 8 files changed, 65 insertions(+), 23 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto diff --git a/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto index 6fa131e5..ad4178ec 100644 --- a/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto @@ -3,9 +3,9 @@ "startingPose": { "position": { "x": 0.73, - "y": 4.47 + "y": 6.62 }, - "rotation": 120.0 + "rotation": -120.0 }, "command": { "type": "sequential", diff --git a/src/main/deploy/pathplanner/autos/PresetMid1Score.auto b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto index 6fa131e5..281017e2 100644 --- a/src/main/deploy/pathplanner/autos/PresetMid1Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto @@ -2,10 +2,10 @@ "version": 1.0, "startingPose": { "position": { - "x": 0.73, - "y": 4.47 + "x": 1.33, + "y": 5.55 }, - "rotation": 120.0 + "rotation": 180.0 }, "command": { "type": "sequential", diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto index 26616449..5d5d05f9 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto @@ -23,18 +23,6 @@ "pathName": "SpeakerToMidNoteReturn" } }, - { - "type": "named", - "data": { - "name": "SubwooferLaunch" - } - }, - { - "type": "path", - "data": { - "pathName": "SpeakerToHighNoteReturn" - } - }, { "type": "named", "data": { diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto new file mode 100644 index 00000000..26616449 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 1.33, + "y": 5.55 + }, + "rotation": 180.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "SpeakerToMidNoteReturn" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "SpeakerToHighNoteReturn" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto index 0aef4b66..8f295fb2 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto @@ -3,7 +3,7 @@ "startingPose": { "position": { "x": 0.73, - "y": 4.47 + "y": 4.46 }, "rotation": 120.0 }, diff --git a/src/main/deploy/pathplanner/paths/LowPassAutoLine.path b/src/main/deploy/pathplanner/paths/LowPassAutoLine.path index 0ed8425f..e5c5186b 100644 --- a/src/main/deploy/pathplanner/paths/LowPassAutoLine.path +++ b/src/main/deploy/pathplanner/paths/LowPassAutoLine.path @@ -39,13 +39,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 0, + "rotation": 180.0, "rotateFast": false }, "reversed": false, "folder": null, "previewStartingState": { - "rotation": 0, + "rotation": 180.0, "velocity": 0 }, "useDefaultConstraints": true diff --git a/src/main/deploy/practiceswerve/modules/backleft.json b/src/main/deploy/practiceswerve/modules/backleft.json index c2eab8f3..4706c78f 100644 --- a/src/main/deploy/practiceswerve/modules/backleft.json +++ b/src/main/deploy/practiceswerve/modules/backleft.json @@ -3,7 +3,7 @@ "front": -12.5, "left": 12.5 }, - "absoluteEncoderOffset": 28.47476562500003, + "absoluteEncoderOffset": 265.47476562500003, "drive": { "type": "falcon", "id": 7, diff --git a/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java b/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java index 7aaa630c..0397f2b7 100644 --- a/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java +++ b/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java @@ -17,8 +17,13 @@ public SetAngleCommand(LauncherSubsystem launcherSubsystem, DoubleSupplier angle @Override public void execute() { - - launcherSubsystem.setAngleSpeed(launcherAngleSpeed.getAsDouble()); + if (launcherAngleSpeed.getAsDouble() != 0.0) { + launcherSubsystem.setAngleSpeed(launcherAngleSpeed.getAsDouble()); + } + else { + launcherSubsystem.setAngle(launcherSubsystem.getAngle()); + } + } @Override From c0f988ab19a214da917363cc9cc0f0506641bff1 Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sat, 2 Mar 2024 15:17:51 -0800 Subject: [PATCH 3/7] never again --- .../frc/team2412/robot/commands/launcher/SetAngleCommand.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java b/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java index 0397f2b7..37ea476d 100644 --- a/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java +++ b/src/main/java/frc/team2412/robot/commands/launcher/SetAngleCommand.java @@ -20,10 +20,6 @@ public void execute() { if (launcherAngleSpeed.getAsDouble() != 0.0) { launcherSubsystem.setAngleSpeed(launcherAngleSpeed.getAsDouble()); } - else { - launcherSubsystem.setAngle(launcherSubsystem.getAngle()); - } - } @Override From f7517f92477f160b4d728b951466e7d6b96ceae8 Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sat, 2 Mar 2024 16:14:34 -0800 Subject: [PATCH 4/7] preset auto named commands fix --- .../autos/PresetAmpSideAutoLine3Score.auto | 49 +++++++++++++++++++ .../autos/PresetAmpSideAutoLine4Score.auto | 6 +-- .../autos/PresetMidAutoLine4Score.auto | 8 +-- .../autos/PresetSourceSideAutoLine4Score.auto | 4 +- 4 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto diff --git a/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto new file mode 100644 index 00000000..7cb54280 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto @@ -0,0 +1,49 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 6.62 + }, + "rotation": -120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "HighSpeakerHighNoteReturn" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "HighSpeakerCenterLineNoteReturn" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine4Score.auto index e99f3de9..31854b7b 100644 --- a/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine4Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine4Score.auto @@ -26,7 +26,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -38,7 +38,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -50,7 +50,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto index 0e875c8f..c60b7f68 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto @@ -14,7 +14,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -26,7 +26,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -38,7 +38,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -56,7 +56,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto index ba6e85b5..aa4f057f 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto @@ -32,7 +32,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { @@ -44,7 +44,7 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { From f167965bb3e2a8fb8c9dbf22221a2767ed69876d Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sat, 2 Mar 2024 20:03:12 -0800 Subject: [PATCH 5/7] auto making --- .../autos/PresetSourceSideAutoLine4Score.auto | 4 +- .../paths/LowSpeakerMidNote2Return.path | 21 +++-- .../paths/LowSpeakerToHighNoteReturn.path | 84 +++++++++++++++++++ .../paths/LowSpeakerToMiddleLowNote.path | 30 ++----- .../paths/MiddleLowNoteToLowSpeaker.path | 12 +-- .../modules/physicalproperties.json | 2 +- .../robot/sensors/AprilTagsProcessor.java | 11 ++- .../robot/subsystems/IntakeSubsystem.java | 4 +- .../frc/team2412/robot/util/AutoLogic.java | 1 + 9 files changed, 120 insertions(+), 49 deletions(-) create mode 100644 src/main/deploy/pathplanner/paths/LowSpeakerToHighNoteReturn.path diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto index aa4f057f..a636b97e 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto @@ -50,13 +50,13 @@ { "type": "path", "data": { - "pathName": "SpeakerToHighNoteReturn" + "pathName": "LowSpeakerToHighNoteReturn" } }, { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } } ] diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerMidNote2Return.path b/src/main/deploy/pathplanner/paths/LowSpeakerMidNote2Return.path index df1d255b..4d18958b 100644 --- a/src/main/deploy/pathplanner/paths/LowSpeakerMidNote2Return.path +++ b/src/main/deploy/pathplanner/paths/LowSpeakerMidNote2Return.path @@ -8,8 +8,8 @@ }, "prevControl": null, "nextControl": { - "x": 1.1795692059852587, - "y": 3.8912647394664157 + "x": 1.689169744135214, + "y": 3.8609042538750162 }, "isLocked": false, "linkedName": "LowSpeaker" @@ -32,16 +32,16 @@ }, { "anchor": { - "x": 1.33, - "y": 5.55 + "x": 0.73, + "y": 4.46 }, "prevControl": { - "x": 2.161773632916634, - "y": 5.611534826673257 + "x": 1.679419985918358, + "y": 3.9389023196098654 }, "nextControl": null, "isLocked": false, - "linkedName": "MidSpeaker" + "linkedName": "LowSpeaker" } ], "rotationTargets": [ @@ -59,6 +59,11 @@ "waypointRelativePos": 0.05, "rotationDegrees": 120.0, "rotateFast": false + }, + { + "waypointRelativePos": 1.95, + "rotationDegrees": 120.0, + "rotateFast": false } ], "constraintZones": [], @@ -89,7 +94,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 180.0, + "rotation": 120.0, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerToHighNoteReturn.path b/src/main/deploy/pathplanner/paths/LowSpeakerToHighNoteReturn.path new file mode 100644 index 00000000..c89fea9a --- /dev/null +++ b/src/main/deploy/pathplanner/paths/LowSpeakerToHighNoteReturn.path @@ -0,0 +1,84 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 4.47 + }, + "prevControl": null, + "nextControl": { + "x": 1.679419985918358, + "y": 3.80240570457388 + }, + "isLocked": false, + "linkedName": "LowSpeaker" + }, + { + "anchor": { + "x": 2.9, + "y": 7.000326399702681 + }, + "prevControl": { + "x": 2.742143631555673, + "y": 5.372116777487712 + }, + "nextControl": { + "x": 3.001879489855674, + "y": 8.05116246874518 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 0.73, + "y": 4.47 + }, + "prevControl": { + "x": 2.0791600728094584, + "y": 3.3149177937310745 + }, + "nextControl": null, + "isLocked": false, + "linkedName": "LowSpeaker" + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.9, + "rotationDegrees": 165.1, + "rotateFast": false + }, + { + "waypointRelativePos": 1.9, + "rotationDegrees": 120.0, + "rotateFast": false + }, + { + "waypointRelativePos": 1.2, + "rotationDegrees": 175.81478896295528, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 120.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 120.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path b/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path index 6ecbdb51..d8e4c07e 100644 --- a/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path +++ b/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path @@ -48,16 +48,16 @@ }, { "anchor": { - "x": 8.3, - "y": 0.8 + "x": 9.09898598894585, + "y": 0.8080477216589235 }, "prevControl": { - "x": 7.737879845802489, - "y": 0.8 + "x": 8.536865834748339, + "y": 0.8080477216589235 }, "nextControl": null, "isLocked": false, - "linkedName": null + "linkedName": "CenterLineN5" } ], "rotationTargets": [ @@ -73,25 +73,7 @@ } ], "constraintZones": [], - "eventMarkers": [ - { - "name": "New Event Marker", - "waypointRelativePos": 1.5, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Intake" - } - } - ] - } - } - } - ], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 4.0, "maxAcceleration": 3.0, diff --git a/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path b/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path index 228fe8c6..b62d5a1d 100644 --- a/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path +++ b/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path @@ -3,16 +3,16 @@ "waypoints": [ { "anchor": { - "x": 8.3, - "y": 0.8 + "x": 9.09898598894585, + "y": 0.8080477216589235 }, "prevControl": null, "nextControl": { - "x": 4.9, - "y": 0.8000000000000005 + "x": 5.69898598894585, + "y": 0.8080477216589248 }, "isLocked": false, - "linkedName": null + "linkedName": "CenterLineN5" }, { "anchor": { @@ -60,7 +60,7 @@ "eventMarkers": [ { "name": "New Event Marker", - "waypointRelativePos": 0, + "waypointRelativePos": 0.25, "command": { "type": "parallel", "data": { diff --git a/src/main/deploy/practiceswerve/modules/physicalproperties.json b/src/main/deploy/practiceswerve/modules/physicalproperties.json index 529e22f2..338a9257 100644 --- a/src/main/deploy/practiceswerve/modules/physicalproperties.json +++ b/src/main/deploy/practiceswerve/modules/physicalproperties.json @@ -7,7 +7,7 @@ }, "conversionFactor": { "angle": 19.2, - "drive": 0.067918200396 + "drive": 0.0696793458626792 }, "rampRate": { "drive": 0.25, diff --git a/src/main/java/frc/team2412/robot/sensors/AprilTagsProcessor.java b/src/main/java/frc/team2412/robot/sensors/AprilTagsProcessor.java index 0606fab9..01975444 100644 --- a/src/main/java/frc/team2412/robot/sensors/AprilTagsProcessor.java +++ b/src/main/java/frc/team2412/robot/sensors/AprilTagsProcessor.java @@ -17,7 +17,6 @@ import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj.smartdashboard.FieldObject2d; import frc.team2412.robot.Hardware; -import frc.team2412.robot.Robot; import frc.team2412.robot.util.DrivebaseWrapper; import frc.team2412.robot.util.SendablePose3d; import java.util.EnumSet; @@ -128,11 +127,11 @@ public AprilTagsProcessor(DrivebaseWrapper aprilTagsHelper) { this.aprilTagsHelper = aprilTagsHelper; rawVisionFieldObject = aprilTagsHelper.getField().getObject("RawVision"); var networkTables = NetworkTableInstance.getDefault(); - if (Robot.isSimulation()) { - networkTables.stopServer(); - networkTables.setServer(Hardware.PHOTON_IP); - networkTables.startClient4("Photonvision"); - } + // if (Robot.isSimulation()) { + // networkTables.stopServer(); + // networkTables.setServer(Hardware.PHOTON_IP); + // networkTables.startClient4("Photonvision"); + // } photonCamera = new PhotonCamera(Hardware.PHOTON_CAM); photonPoseEstimator = diff --git a/src/main/java/frc/team2412/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/team2412/robot/subsystems/IntakeSubsystem.java index 02981ceb..886b5d14 100644 --- a/src/main/java/frc/team2412/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/team2412/robot/subsystems/IntakeSubsystem.java @@ -17,7 +17,7 @@ public class IntakeSubsystem extends SubsystemBase { // Constants - public static final double INTAKE_IN_SPEED = 0.3; + public static final double INTAKE_IN_SPEED = 0.6; public static final double INTAKE_REVERSE_SPEED = -0.7; public static final double INTAKE_REJECT_SPEED = -0.4; @@ -123,7 +123,7 @@ public class IntakeSubsystem extends SubsystemBase { Shuffleboard.getTab("Intake") .add("Override Sensors", false) .withSize(1, 1) - .withWidget(BuiltInWidgets.kTextView) + .withWidget(BuiltInWidgets.kToggleSwitch) .getEntry(); public IntakeSubsystem() { diff --git a/src/main/java/frc/team2412/robot/util/AutoLogic.java b/src/main/java/frc/team2412/robot/util/AutoLogic.java index e4c2070d..7c7852d7 100644 --- a/src/main/java/frc/team2412/robot/util/AutoLogic.java +++ b/src/main/java/frc/team2412/robot/util/AutoLogic.java @@ -81,6 +81,7 @@ public void registerCommands() { "MidSpeakerCenterLineN5N4N3", AutoPaths.midSpeakerCenterLineN3N2N1); NamedCommands.registerCommand( "LowSpeakerCenterLineN5N4N3", AutoPaths.lowSpeakerCenterLineN5N4N3); + NamedCommands.registerCommand("LowSpeakerCenterLineN5N4N3", AutoPaths.lowSpeakerCenterLineN5N4); NamedCommands.registerCommand( "TopSpeakerCenterLineN1N2AutoLine1", AutoPaths.TopSpeakerCenterLineN1N2AutoLine1); NamedCommands.registerCommand( From 2cf0c826f1135033e7bba2c63a519c7003935744 Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sun, 3 Mar 2024 12:14:42 -0800 Subject: [PATCH 6/7] lower brownout voltage --- .pathplanner/settings.json | 2 +- .../autos/PresetAmpSideAutoLine3Score.auto | 6 ++ .../pathplanner/autos/PresetMid1Score.auto | 6 ++ .../autos/PresetMidAutoLine4Score.auto | 12 +-- .../autos/PresetMidAutoline2Score.auto | 6 ++ .../autos/PresetSourceSide1Score.auto | 2 +- .../autos/PresetSourceSideAutoline2Score.auto | 43 +++++++++++ .../autos/PresetSourceSideFar2Score.auto | 6 ++ .../paths/HighSpeakerCenterLine.path | 58 +++++++++++++++ .../HighSpeakerCenterLineNoteReturn.path | 16 ++-- .../paths/HighSpeakerHighNoteReturn.path | 30 +++++--- .../paths/HighSpeakerPassAutoLine.path | 52 +++++++++++++ .../paths/LowNoteToLowSpeaker.path | 29 +++----- .../pathplanner/paths/LowNoteToSpeaker.path | 8 +- .../paths/LowSpeakerCenterLine.path | 58 +++++++++++++++ .../paths/LowSpeakerPassAutoLine.path | 22 ++++-- .../paths/LowSpeakerToMiddleLowNote.path | 20 ++--- .../paths/MidSpeakerCenterline.path | 74 +++++++++++++++++++ .../paths/MidSpeakerPassAutoLine.path | 58 +++++++++++++++ .../paths/MiddleLowNoteToLowSpeaker.path | 8 +- src/main/java/frc/team2412/robot/Robot.java | 3 + 21 files changed, 449 insertions(+), 70 deletions(-) create mode 100644 src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto create mode 100644 src/main/deploy/pathplanner/paths/HighSpeakerCenterLine.path create mode 100644 src/main/deploy/pathplanner/paths/HighSpeakerPassAutoLine.path create mode 100644 src/main/deploy/pathplanner/paths/LowSpeakerCenterLine.path create mode 100644 src/main/deploy/pathplanner/paths/MidSpeakerCenterline.path create mode 100644 src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index d7fc8adb..f2b442cd 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -1,6 +1,6 @@ { "robotWidth": 0.84, - "robotLength": 0.841375, + "robotLength": 0.84, "holonomicMode": true, "pathFolders": [ "Auto Logic Paths" diff --git a/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto index 7cb54280..c305a15e 100644 --- a/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto @@ -40,6 +40,12 @@ "data": { "name": "SubwooferLaunch" } + }, + { + "type": "path", + "data": { + "pathName": "HighSpeakerCenterLine" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/PresetMid1Score.auto b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto index 281017e2..7822078a 100644 --- a/src/main/deploy/pathplanner/autos/PresetMid1Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto @@ -16,6 +16,12 @@ "data": { "name": "SubwooferLaunch" } + }, + { + "type": "path", + "data": { + "pathName": "MidSpeakerPassAutoLine" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto index c60b7f68..0abc20ed 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto @@ -32,25 +32,25 @@ { "type": "path", "data": { - "pathName": "SpeakerToHighNoteReturn" + "pathName": "SpeakerToLowNote" } }, { - "type": "named", + "type": "path", "data": { - "name": "SubwooferLaunch" + "pathName": "LowNoteToSpeaker" } }, { - "type": "path", + "type": "named", "data": { - "pathName": "SpeakerToLowNote" + "name": "SubwooferLaunch" } }, { "type": "path", "data": { - "pathName": "LowNoteToSpeaker" + "pathName": "SpeakerToHighNoteReturn" } }, { diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto index 5d5d05f9..4cf2f804 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto @@ -28,6 +28,12 @@ "data": { "name": "SubwooferLaunch" } + }, + { + "type": "path", + "data": { + "pathName": "MidSpeakerPassAutoLine" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto index 8f295fb2..c83d529a 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto @@ -20,7 +20,7 @@ { "type": "path", "data": { - "pathName": "LowSpeakerPassAutoLine" + "pathName": "LowSpeakerCenterLine" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto new file mode 100644 index 00000000..189725f7 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto @@ -0,0 +1,43 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 4.47 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "LowSpeakerToLowNote" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "LowNoteToLowSpeaker" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideFar2Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideFar2Score.auto index 2d45fe3a..d06d2c7f 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSideFar2Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideFar2Score.auto @@ -34,6 +34,12 @@ "data": { "name": "SubwooferLaunch" } + }, + { + "type": "path", + "data": { + "pathName": "LowSpeakerCenterLine" + } } ] } diff --git a/src/main/deploy/pathplanner/paths/HighSpeakerCenterLine.path b/src/main/deploy/pathplanner/paths/HighSpeakerCenterLine.path new file mode 100644 index 00000000..97f3d912 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/HighSpeakerCenterLine.path @@ -0,0 +1,58 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 6.62 + }, + "prevControl": null, + "nextControl": { + "x": 2.966388070543364, + "y": 7.30256890442522 + }, + "isLocked": false, + "linkedName": "TopSpeaker" + }, + { + "anchor": { + "x": 6.037561908853035, + "y": 6.834580510016127 + }, + "prevControl": { + "x": 4.965088504998865, + "y": 7.058824949003817 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.05, + "rotationDegrees": -120.0, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": -120.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/HighSpeakerCenterLineNoteReturn.path b/src/main/deploy/pathplanner/paths/HighSpeakerCenterLineNoteReturn.path index 48585a2e..479061ad 100644 --- a/src/main/deploy/pathplanner/paths/HighSpeakerCenterLineNoteReturn.path +++ b/src/main/deploy/pathplanner/paths/HighSpeakerCenterLineNoteReturn.path @@ -16,16 +16,16 @@ }, { "anchor": { - "x": 8.279501243687172, - "y": 7.432741351969191 + "x": 8.835742517090736, + "y": 7.47806455232863 }, "prevControl": { - "x": 8.648237134617453, - "y": 7.420344653068651 + "x": 9.204478408021018, + "y": 7.46566785342809 }, "nextControl": { - "x": 7.910765352756883, - "y": 7.445138050869731 + "x": 8.467006626160448, + "y": 7.49046125122917 }, "isLocked": false, "linkedName": null @@ -47,11 +47,11 @@ "rotationTargets": [ { "waypointRelativePos": 0.75, - "rotationDegrees": -168.82, + "rotationDegrees": -158.40052752916873, "rotateFast": false }, { - "waypointRelativePos": 1.1, + "waypointRelativePos": 1.2, "rotationDegrees": -168.82, "rotateFast": false } diff --git a/src/main/deploy/pathplanner/paths/HighSpeakerHighNoteReturn.path b/src/main/deploy/pathplanner/paths/HighSpeakerHighNoteReturn.path index c55bb1df..8c6238c5 100644 --- a/src/main/deploy/pathplanner/paths/HighSpeakerHighNoteReturn.path +++ b/src/main/deploy/pathplanner/paths/HighSpeakerHighNoteReturn.path @@ -12,20 +12,20 @@ "y": 6.725393882216337 }, "isLocked": false, - "linkedName": null + "linkedName": "TopSpeaker" }, { "anchor": { - "x": 2.987, - "y": 6.998240302786913 + "x": 2.9273890376759386, + "y": 7.039325432570105 }, "prevControl": { - "x": 3.3557358909302852, - "y": 6.985843603886373 + "x": 3.2961249286062237, + "y": 7.026928733669565 }, "nextControl": { - "x": 2.6182641090697114, - "y": 7.010637001687453 + "x": 2.55865314674565, + "y": 7.051722131470645 }, "isLocked": false, "linkedName": null @@ -47,12 +47,22 @@ "rotationTargets": [ { "waypointRelativePos": 0.5, - "rotationDegrees": -168.82, + "rotationDegrees": -164.96451225420628, + "rotateFast": false + }, + { + "waypointRelativePos": 0.8, + "rotationDegrees": -161.1834449797382, + "rotateFast": false + }, + { + "waypointRelativePos": 0.05, + "rotationDegrees": -120.0, "rotateFast": false }, { - "waypointRelativePos": 1.1, - "rotationDegrees": -168.82, + "waypointRelativePos": 1.95, + "rotationDegrees": -120.0, "rotateFast": false } ], diff --git a/src/main/deploy/pathplanner/paths/HighSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/HighSpeakerPassAutoLine.path new file mode 100644 index 00000000..4bc34150 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/HighSpeakerPassAutoLine.path @@ -0,0 +1,52 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 6.62 + }, + "prevControl": null, + "nextControl": { + "x": 1.757418051653207, + "y": 6.82483075179927 + }, + "isLocked": false, + "linkedName": "TopSpeaker" + }, + { + "anchor": { + "x": 5.813317469865345, + "y": 7.000326399702681 + }, + "prevControl": { + "x": 4.555598659890908, + "y": 7.0198259161363925 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": -146.8214883406072, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": -120.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path b/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path index 2dd0b6dc..ed4eb627 100644 --- a/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path +++ b/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path @@ -28,27 +28,20 @@ "linkedName": "LowSpeaker" } ], - "rotationTargets": [], - "constraintZones": [], - "eventMarkers": [ + "rotationTargets": [ + { + "waypointRelativePos": 0.9, + "rotationDegrees": 120.0, + "rotateFast": false + }, { - "name": "New Event Marker", - "waypointRelativePos": 0, - "command": { - "type": "parallel", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "Intake" - } - } - ] - } - } + "waypointRelativePos": 0.05, + "rotationDegrees": 180.0, + "rotateFast": false } ], + "constraintZones": [], + "eventMarkers": [], "globalConstraints": { "maxVelocity": 4.0, "maxAcceleration": 3.0, diff --git a/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path b/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path index a883bea4..a9426ea0 100644 --- a/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path +++ b/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path @@ -8,8 +8,8 @@ }, "prevControl": null, "nextControl": { - "x": 2.266667696398456, - "y": 4.123137615644601 + "x": 2.547148467218551, + "y": 4.962626932379757 }, "isLocked": false, "linkedName": "Podium" @@ -20,8 +20,8 @@ "y": 5.55 }, "prevControl": { - "x": 1.4961550043820806, - "y": 4.714798618786427 + "x": 1.8549156338217678, + "y": 5.557362183607978 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerCenterLine.path b/src/main/deploy/pathplanner/paths/LowSpeakerCenterLine.path new file mode 100644 index 00000000..30af0d1c --- /dev/null +++ b/src/main/deploy/pathplanner/paths/LowSpeakerCenterLine.path @@ -0,0 +1,58 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 4.46 + }, + "prevControl": null, + "nextControl": { + "x": 1.689169744135214, + "y": 2.3204424556117518 + }, + "isLocked": false, + "linkedName": "LowSpeaker" + }, + { + "anchor": { + "x": 4.945588988565151, + "y": 1.5209622818295532 + }, + "prevControl": { + "x": 3.0638856527119245, + "y": 1.5892105893475446 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.05, + "rotationDegrees": 120.0, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 120.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path index 04351df3..c270d58a 100644 --- a/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path +++ b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path @@ -8,27 +8,33 @@ }, "prevControl": null, "nextControl": { - "x": 1.4844248215812361, - "y": 3.197920695128801 + "x": 1.2211813497261212, + "y": 3.05167432187596 }, "isLocked": false, "linkedName": "LowSpeaker" }, { "anchor": { - "x": 3.24913105883219, - "y": 1.4722134907452726 + "x": 4.711594791360605, + "y": 1.1504714695890206 }, "prevControl": { - "x": 1.9914122488577533, - "y": 2.1936955987926234 + "x": 2.9956373451939315, + "y": 1.50146276539584 }, "nextControl": null, "isLocked": false, "linkedName": null } ], - "rotationTargets": [], + "rotationTargets": [ + { + "waypointRelativePos": 0.05, + "rotationDegrees": 120.0, + "rotateFast": false + } + ], "constraintZones": [], "eventMarkers": [], "globalConstraints": { @@ -39,7 +45,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 120.0, + "rotation": 178.12212255271464, "rotateFast": false }, "reversed": false, diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path b/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path index d8e4c07e..0c370098 100644 --- a/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path +++ b/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path @@ -16,16 +16,16 @@ }, { "anchor": { - "x": 2.7778742005415524, - "y": 1.2881920200359664 + "x": 3.034636378061356, + "y": 1.5112125236126965 }, "prevControl": { - "x": 1.1900561100054632, - "y": 1.5888973576834935 + "x": 1.7459946013496772, + "y": 2.4864008951782903 }, "nextControl": { - "x": 5.2842174152816765, - "y": 0.8135338793200119 + "x": 4.116859540132383, + "y": 0.6922328333967845 }, "isLocked": false, "linkedName": null @@ -48,12 +48,12 @@ }, { "anchor": { - "x": 9.09898598894585, - "y": 0.8080477216589235 + "x": 9.011238164994147, + "y": 0.81 }, "prevControl": { - "x": 8.536865834748339, - "y": 0.8080477216589235 + "x": 8.449118010796635, + "y": 0.81 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/MidSpeakerCenterline.path b/src/main/deploy/pathplanner/paths/MidSpeakerCenterline.path new file mode 100644 index 00000000..991430ce --- /dev/null +++ b/src/main/deploy/pathplanner/paths/MidSpeakerCenterline.path @@ -0,0 +1,74 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 1.33, + "y": 5.55 + }, + "prevControl": null, + "nextControl": { + "x": 2.4106518521825655, + "y": 5.645110007559683 + }, + "isLocked": false, + "linkedName": "MidSpeaker" + }, + { + "anchor": { + "x": 4.828591889962878, + "y": 4.3678916811515345 + }, + "prevControl": { + "x": 3.8008686983169317, + "y": 5.605830980179606 + }, + "nextControl": { + "x": 5.257581251504547, + "y": 3.8511544956581605 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 7.539024674248874, + "y": 4.143647242163843 + }, + "prevControl": { + "x": 6.105810216371028, + "y": 3.8609042538750162 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.95, + "rotationDegrees": 152.14947029794482, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 180.0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 180.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path new file mode 100644 index 00000000..054b033f --- /dev/null +++ b/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path @@ -0,0 +1,58 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 1.33, + "y": 5.55 + }, + "prevControl": null, + "nextControl": { + "x": 1.6502553451563295, + "y": 5.55 + }, + "isLocked": false, + "linkedName": "MidSpeaker" + }, + { + "anchor": { + "x": 4.1363590565660955, + "y": 5.55 + }, + "prevControl": { + "x": 3.4246267067356, + "y": 5.481751692482008 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.05, + "rotationDegrees": 180.0, + "rotateFast": false + } + ], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 4.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": null, + "previewStartingState": { + "rotation": 180.0, + "velocity": 0 + }, + "useDefaultConstraints": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path b/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path index b62d5a1d..a493f90b 100644 --- a/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path +++ b/src/main/deploy/pathplanner/paths/MiddleLowNoteToLowSpeaker.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 9.09898598894585, - "y": 0.8080477216589235 + "x": 9.011238164994147, + "y": 0.81 }, "prevControl": null, "nextControl": { - "x": 5.69898598894585, - "y": 0.8080477216589248 + "x": 5.6112381649941465, + "y": 0.8100000000000014 }, "isLocked": false, "linkedName": "CenterLineN5" diff --git a/src/main/java/frc/team2412/robot/Robot.java b/src/main/java/frc/team2412/robot/Robot.java index 5d4e3360..c4f87026 100644 --- a/src/main/java/frc/team2412/robot/Robot.java +++ b/src/main/java/frc/team2412/robot/Robot.java @@ -6,6 +6,7 @@ import edu.wpi.first.wpilibj.PowerDistribution; import edu.wpi.first.wpilibj.PowerDistribution.ModuleType; import edu.wpi.first.wpilibj.RobotBase; +import edu.wpi.first.wpilibj.RobotController; import edu.wpi.first.wpilibj.TimedRobot; import edu.wpi.first.wpilibj.livewindow.LiveWindow; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; @@ -114,6 +115,8 @@ public void robotInit() { DriverStation.silenceJoystickConnectionWarning(true); dashboard = new MatchDashboard(subsystems); + + RobotController.setBrownoutVoltage(5.75); } @Override From 653910c335863c358db1709f6d0ab041d85d2d65 Mon Sep 17 00:00:00 2001 From: DriverStation3 <58869582+jbko6@users.noreply.github.com> Date: Sun, 3 Mar 2024 14:02:48 -0800 Subject: [PATCH 7/7] gp elims --- .../pathplanner/autos/PresetMidAutoline3Score.auto | 6 ++++++ .../autos/PresetSourceSideAutoline2Score.auto | 8 +++++++- .../deploy/pathplanner/paths/BottomNoteLaunch.path | 8 ++++---- src/main/deploy/pathplanner/paths/LowNoteToLaunch.path | 8 ++++---- .../deploy/pathplanner/paths/LowNoteToLowSpeaker.path | 10 +++++----- .../deploy/pathplanner/paths/LowNoteToSpeaker.path | 8 ++++---- .../deploy/pathplanner/paths/LowSpeakerToLowNote.path | 8 ++++---- .../deploy/pathplanner/paths/MidNoteToBottomNote.path | 8 ++++---- .../pathplanner/paths/MidSpeakerPassAutoLine.path | 4 ++-- .../deploy/pathplanner/paths/SpeakerToLowNote.path | 8 ++++---- 10 files changed, 44 insertions(+), 32 deletions(-) diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto index 26616449..2885a3d4 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto @@ -40,6 +40,12 @@ "data": { "name": "SubwooferLaunch" } + }, + { + "type": "path", + "data": { + "pathName": "MidSpeakerPassAutoLine" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto index 189725f7..cc1af19d 100644 --- a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto @@ -23,6 +23,12 @@ "pathName": "LowSpeakerToLowNote" } }, + { + "type": "path", + "data": { + "pathName": "LowNoteToLowSpeaker" + } + }, { "type": "named", "data": { @@ -32,7 +38,7 @@ { "type": "path", "data": { - "pathName": "LowNoteToLowSpeaker" + "pathName": "LowSpeakerCenterLine" } } ] diff --git a/src/main/deploy/pathplanner/paths/BottomNoteLaunch.path b/src/main/deploy/pathplanner/paths/BottomNoteLaunch.path index fcdb960a..2d3093eb 100644 --- a/src/main/deploy/pathplanner/paths/BottomNoteLaunch.path +++ b/src/main/deploy/pathplanner/paths/BottomNoteLaunch.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.7713929062062417, + "y": 4.07539893464585 }, "prevControl": null, "nextControl": { - "x": 2.524746117192999, - "y": 4.003997174531632 + "x": 2.6561390233992404, + "y": 3.9793961091774825 }, "isLocked": false, "linkedName": "Podium" diff --git a/src/main/deploy/pathplanner/paths/LowNoteToLaunch.path b/src/main/deploy/pathplanner/paths/LowNoteToLaunch.path index 5e0ff13b..ebe8acca 100644 --- a/src/main/deploy/pathplanner/paths/LowNoteToLaunch.path +++ b/src/main/deploy/pathplanner/paths/LowNoteToLaunch.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.7713929062062417, + "y": 4.07539893464585 }, "prevControl": null, "nextControl": { - "x": 2.4323196806588725, - "y": 4.243322559198271 + "x": 2.563712586865114, + "y": 4.2187214938441215 }, "isLocked": false, "linkedName": "Podium" diff --git a/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path b/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path index ed4eb627..539e4dda 100644 --- a/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path +++ b/src/main/deploy/pathplanner/paths/LowNoteToLowSpeaker.path @@ -3,16 +3,16 @@ "waypoints": [ { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.77, + "y": 4.08 }, "prevControl": null, "nextControl": { - "x": 2.266667696398456, - "y": 4.123137615644601 + "x": 2.3966676963984557, + "y": 4.103137615644601 }, "isLocked": false, - "linkedName": "Podium" + "linkedName": null }, { "anchor": { diff --git a/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path b/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path index a9426ea0..3e622c1b 100644 --- a/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path +++ b/src/main/deploy/pathplanner/paths/LowNoteToSpeaker.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.7713929062062417, + "y": 4.07539893464585 }, "prevControl": null, "nextControl": { - "x": 2.547148467218551, - "y": 4.962626932379757 + "x": 2.6785413734247925, + "y": 4.938025867025607 }, "isLocked": false, "linkedName": "Podium" diff --git a/src/main/deploy/pathplanner/paths/LowSpeakerToLowNote.path b/src/main/deploy/pathplanner/paths/LowSpeakerToLowNote.path index 2403f405..a8833ea8 100644 --- a/src/main/deploy/pathplanner/paths/LowSpeakerToLowNote.path +++ b/src/main/deploy/pathplanner/paths/LowSpeakerToLowNote.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.77, + "y": 4.07539893464585 }, "prevControl": { - "x": 2.3213806186170927, - "y": 4.095403506122328 + "x": 2.4513806186170926, + "y": 4.070802440768179 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/MidNoteToBottomNote.path b/src/main/deploy/pathplanner/paths/MidNoteToBottomNote.path index d22e81c5..83f8c4da 100644 --- a/src/main/deploy/pathplanner/paths/MidNoteToBottomNote.path +++ b/src/main/deploy/pathplanner/paths/MidNoteToBottomNote.path @@ -16,12 +16,12 @@ }, { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.7713929062062417, + "y": 4.07539893464585 }, "prevControl": { - "x": 1.6927408027789026, - "y": 4.243318756907785 + "x": 1.8241337089851442, + "y": 4.2187176915536355 }, "nextControl": null, "isLocked": false, diff --git a/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path index 054b033f..110f1af6 100644 --- a/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path +++ b/src/main/deploy/pathplanner/paths/MidSpeakerPassAutoLine.path @@ -38,8 +38,8 @@ "constraintZones": [], "eventMarkers": [], "globalConstraints": { - "maxVelocity": 4.0, - "maxAcceleration": 3.0, + "maxVelocity": 2.0, + "maxAcceleration": 2.0, "maxAngularVelocity": 540.0, "maxAngularAcceleration": 720.0 }, diff --git a/src/main/deploy/pathplanner/paths/SpeakerToLowNote.path b/src/main/deploy/pathplanner/paths/SpeakerToLowNote.path index 30766501..6f09d6bd 100644 --- a/src/main/deploy/pathplanner/paths/SpeakerToLowNote.path +++ b/src/main/deploy/pathplanner/paths/SpeakerToLowNote.path @@ -32,12 +32,12 @@ }, { "anchor": { - "x": 2.64, - "y": 4.1 + "x": 2.7713929062062417, + "y": 4.07539893464585 }, "prevControl": { - "x": 2.3213806186170927, - "y": 4.095403506122328 + "x": 2.452773524823334, + "y": 4.070802440768179 }, "nextControl": null, "isLocked": false,