diff --git a/.pathplanner/settings.json b/.pathplanner/settings.json index 8489ac29..c5f6b3f5 100644 --- a/.pathplanner/settings.json +++ b/.pathplanner/settings.json @@ -1,14 +1,16 @@ { - "robotWidth": 0.64, - "robotLength": 0.84, + "robotWidth": 0.7239, + "robotLength": 0.9271, "holonomicMode": true, "pathFolders": [ + "Amp Two Note", "Drift Test Paths", - "Amp Two Note" + "Source Three Note" ], "autoFolders": [ + "Amp Side Autos", "Drift Tests", - "Amp Side Autos" + "Source Side Autos" ], "defaultMaxVel": 2.7, "defaultMaxAccel": 2.0, diff --git a/src/main/deploy/pathplanner/autos/Source_ThreeNote.auto b/src/main/deploy/pathplanner/autos/Source_ThreeNote.auto new file mode 100644 index 00000000..73f94058 --- /dev/null +++ b/src/main/deploy/pathplanner/autos/Source_ThreeNote.auto @@ -0,0 +1,105 @@ +{ + "version": 1.0, + "startingPose": { + "position": { + "x": 0.81, + "y": 4.43 + }, + "rotation": -60.0 + }, + "command": { + "type": "sequential", + "data": { + "commands": [ + { + "type": "named", + "data": { + "name": "Set Down" + } + }, + { + "type": "named", + "data": { + "name": "Aim Subwoofer" + } + }, + { + "type": "named", + "data": { + "name": "Shoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Source_PodiumNote" + } + }, + { + "type": "named", + "data": { + "name": "Intake Sequence" + } + } + ] + } + }, + { + "type": "path", + "data": { + "pathName": "Podium_MicroAdjustment" + } + }, + { + "type": "named", + "data": { + "name": "Auto Aim" + } + }, + { + "type": "named", + "data": { + "name": "Shoot" + } + }, + { + "type": "parallel", + "data": { + "commands": [ + { + "type": "path", + "data": { + "pathName": "Source_CentralNote" + } + }, + { + "type": "named", + "data": { + "name": "Intake Sequence" + } + } + ] + } + }, + { + "type": "named", + "data": { + "name": "Auto Aim" + } + }, + { + "type": "named", + "data": { + "name": "Shoot" + } + } + ] + } + }, + "folder": "Source Side Autos", + "choreoAuto": false +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/autos/Three_Note_Auto_Aim.auto b/src/main/deploy/pathplanner/autos/Three_Note_Amp.auto similarity index 100% rename from src/main/deploy/pathplanner/autos/Three_Note_Auto_Aim.auto rename to src/main/deploy/pathplanner/autos/Three_Note_Amp.auto diff --git a/src/main/deploy/pathplanner/paths/Podium_MicroAdjustment.path b/src/main/deploy/pathplanner/paths/Podium_MicroAdjustment.path new file mode 100644 index 00000000..3a7c29bb --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Podium_MicroAdjustment.path @@ -0,0 +1,52 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 2.7, + "y": 4.09 + }, + "prevControl": null, + "nextControl": { + "x": 2.004958988519973, + "y": 4.403274541213847 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.0752240077946618, + "y": 5.550936522700434 + }, + "prevControl": { + "x": 1.9229831326995024, + "y": 4.953683858865578 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 2.7, + "maxAcceleration": 2.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": "Source Three Note", + "previewStartingState": { + "rotation": 0, + "velocity": 0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Source_CentralNote.path b/src/main/deploy/pathplanner/paths/Source_CentralNote.path new file mode 100644 index 00000000..c251f548 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Source_CentralNote.path @@ -0,0 +1,52 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 2.08, + "y": 5.55 + }, + "prevControl": null, + "nextControl": { + "x": 2.13, + "y": 5.55 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.7, + "y": 5.55 + }, + "prevControl": { + "x": 2.6500000000000004, + "y": 5.55 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 2.7, + "maxAcceleration": 2.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0, + "rotateFast": false + }, + "reversed": false, + "folder": "Source Three Note", + "previewStartingState": { + "rotation": 0, + "velocity": 0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/Source_PodiumNote.path b/src/main/deploy/pathplanner/paths/Source_PodiumNote.path new file mode 100644 index 00000000..06e15be7 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/Source_PodiumNote.path @@ -0,0 +1,52 @@ +{ + "version": 1.0, + "waypoints": [ + { + "anchor": { + "x": 0.81, + "y": 4.426324656904809 + }, + "prevControl": null, + "nextControl": { + "x": 1.1679081714786952, + "y": 3.9338352480084557 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 2.6958983447254643, + "y": 4.087081954481534 + }, + "prevControl": { + "x": 1.6702725299837478, + "y": 4.048512210582352 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [], + "constraintZones": [], + "eventMarkers": [], + "globalConstraints": { + "maxVelocity": 2.7, + "maxAcceleration": 2.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0 + }, + "goalEndState": { + "velocity": 0, + "rotation": 0, + "rotateFast": false + }, + "reversed": false, + "folder": "Source Three Note", + "previewStartingState": { + "rotation": -60.0, + "velocity": 0 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/java/frc/robot/commands/Autos.kt b/src/main/java/frc/robot/commands/Autos.kt index eaa28ab1..450f5347 100644 --- a/src/main/java/frc/robot/commands/Autos.kt +++ b/src/main/java/frc/robot/commands/Autos.kt @@ -126,21 +126,25 @@ object Autos { return SwerveSubsystem.getAutonomousCommand("Two_Note", true) } - private fun threeNote(): Command { + private fun threeNoteCenter(): Command { return SwerveSubsystem.getAutonomousCommand("Three_Note", true) } - private fun threeNoteAutoAim(): Command { - return SwerveSubsystem.getAutonomousCommand("Three_Note_Auto_Aim", true) + private fun threeNoteAmp(): Command { + return SwerveSubsystem.getAutonomousCommand("Three_Note_Amp", true) } - private fun intakeTest(): Command { - return SwerveSubsystem.getAutonomousCommand("Two_Note_Intake", true) + private fun threeNoteSource(): Command { + return SwerveSubsystem.getAutonomousCommand("Source_ThreeNote", true) } - private fun twoNoteAmp(): Command { - return SwerveSubsystem.getAutonomousCommand("Two_Note_Amp", true) - } +// private fun intakeTest(): Command { +// return SwerveSubsystem.getAutonomousCommand("Two_Note_Intake", true) +// } +// +// private fun twoNoteAmp(): Command { +// return SwerveSubsystem.getAutonomousCommand("Two_Note_Amp", true) +// } @@ -157,14 +161,12 @@ object Autos { EXAMPLE_PATH("Example Path", { examplePath() }), TEST_AUTO("Test Auto", { testAuto() }), SHOOT_DRIVE_MID("Shoot & Drive Source", { shootDriveSource() }), - SHOOT_DRIVE_RIGHT("Shoot & Drive Right", { shootAndDriveRight() }), - SHOOT_DRIVE_LEFT("Shoot & Drive Left", { shootDriveSource() }), + SHOOT_DRIVE_RIGHT("Shoot & Drive Amp", { shootAndDriveRight() }), BASIC_SHOOT("Basic Shoot", { onlyShoot() }), TWO_NOTE("Two Note", {twoNote()}), - INTAKE_TEST("Intake Test", { intakeTest() }), - THREE_NOTE("Three Note", {threeNote()}), - TWO_NOTE_AMP("Two Note Amp", {twoNoteAmp()}), - THREE_NOTE_AUTO_AIM("Three Note Auto Aim", {threeNoteAutoAim()}), + THREE_NOTE_CENTER("Three Note Center", {threeNoteCenter()}), + THREE_NOTE_AMP("Three Note Amp", {threeNoteAmp()}), + THREE_NOTE_SOURCE("Three Note Source", {threeNoteSource()}), ; companion object {