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/PresetAmpSide1Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto new file mode 100644 index 00000000..ad4178ec --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetAmpSide1Score.auto @@ -0,0 +1,25 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 6.62 + }, + "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/PresetAmpSideAutoLine3Score.auto b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto new file mode 100644 index 00000000..c305a15e --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetAmpSideAutoLine3Score.auto @@ -0,0 +1,55 @@ +{ + "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" + } + }, + { + "type": "path", + "data": { + "pathName": "HighSpeakerCenterLine" + } + } + ] + } + }, + "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/PresetMid1Score.auto b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto new file mode 100644 index 00000000..7822078a --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetMid1Score.auto @@ -0,0 +1,31 @@ +{ + "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": "MidSpeakerPassAutoLine" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoLine4Score.auto index 0e875c8f..0abc20ed 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,37 +26,37 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { "type": "path", "data": { - "pathName": "SpeakerToHighNoteReturn" + "pathName": "SpeakerToLowNote" } }, { - "type": "named", + "type": "path", "data": { - "name": "VisionLaunch" + "pathName": "LowNoteToSpeaker" } }, { - "type": "path", + "type": "named", "data": { - "pathName": "SpeakerToLowNote" + "name": "SubwooferLaunch" } }, { "type": "path", "data": { - "pathName": "LowNoteToSpeaker" + "pathName": "SpeakerToHighNoteReturn" } }, { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto index 26616449..4cf2f804 100644 --- a/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline2Score.auto @@ -32,13 +32,7 @@ { "type": "path", "data": { - "pathName": "SpeakerToHighNoteReturn" - } - }, - { - "type": "named", - "data": { - "name": "SubwooferLaunch" + "pathName": "MidSpeakerPassAutoLine" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto new file mode 100644 index 00000000..2885a3d4 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetMidAutoline3Score.auto @@ -0,0 +1,55 @@ +{ + "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" + } + }, + { + "type": "path", + "data": { + "pathName": "MidSpeakerPassAutoLine" + } + } + ] + } + }, + "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..c83d529a --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetSourceSide1Score.auto @@ -0,0 +1,31 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.73, + "y": 4.46 + }, + "rotation": 120.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "LowSpeakerCenterLine" + } + } + ] + } + }, + "folder": "Preset Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoLine4Score.auto index ba6e85b5..a636b97e 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,19 +44,19 @@ { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } }, { "type": "path", "data": { - "pathName": "SpeakerToHighNoteReturn" + "pathName": "LowSpeakerToHighNoteReturn" } }, { "type": "named", "data": { - "name": "VisionLaunch" + "name": "SubwooferLaunch" } } ] diff --git a/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto new file mode 100644 index 00000000..cc1af19d --- /dev/null +++ b/src/main/deploy/pathplanner/autos/PresetSourceSideAutoline2Score.auto @@ -0,0 +1,49 @@ +{ + "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": "path", + "data": { + "pathName": "LowNoteToLowSpeaker" + } + }, + { + "type": "named", + "data": { + "name": "SubwooferLaunch" + } + }, + { + "type": "path", + "data": { + "pathName": "LowSpeakerCenterLine" + } + } + ] + } + }, + "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/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/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/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 2dd0b6dc..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": { @@ -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..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.266667696398456, - "y": 4.123137615644601 + "x": 2.6785413734247925, + "y": 4.938025867025607 }, "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/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/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/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/LowSpeakerPassAutoLine.path b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path new file mode 100644 index 00000000..c270d58a --- /dev/null +++ b/src/main/deploy/pathplanner/paths/LowSpeakerPassAutoLine.path @@ -0,0 +1,58 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.73, + "y": 4.46 + }, + "prevControl": null, + "nextControl": { + "x": 1.2211813497261212, + "y": 3.05167432187596 + }, + "isLocked": false, + "linkedName": "LowSpeaker" + }, + { + "anchor": { + "x": 4.711594791360605, + "y": 1.1504714695890206 + }, + "prevControl": { + "x": 2.9956373451939315, + "y": 1.50146276539584 + }, + "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": 178.12212255271464, + "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/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/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/LowSpeakerToMiddleLowNote.path b/src/main/deploy/pathplanner/paths/LowSpeakerToMiddleLowNote.path index 6ecbdb51..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,16 +48,16 @@ }, { "anchor": { - "x": 8.3, - "y": 0.8 + "x": 9.011238164994147, + "y": 0.81 }, "prevControl": { - "x": 7.737879845802489, - "y": 0.8 + "x": 8.449118010796635, + "y": 0.81 }, "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/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/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..110f1af6 --- /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": 2.0, + "maxAcceleration": 2.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 228fe8c6..a493f90b 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.011238164994147, + "y": 0.81 }, "prevControl": null, "nextControl": { - "x": 4.9, - "y": 0.8000000000000005 + "x": 5.6112381649941465, + "y": 0.8100000000000014 }, "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/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, 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/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/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 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..37ea476d 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,9 @@ public SetAngleCommand(LauncherSubsystem launcherSubsystem, DoubleSupplier angle @Override public void execute() { - - launcherSubsystem.setAngleSpeed(launcherAngleSpeed.getAsDouble()); + if (launcherAngleSpeed.getAsDouble() != 0.0) { + launcherSubsystem.setAngleSpeed(launcherAngleSpeed.getAsDouble()); + } } @Override 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(