Skip to content

Commit

Permalink
we cook
Browse files Browse the repository at this point in the history
  • Loading branch information
falOn-Dev committed Mar 23, 2024
1 parent 0b2eb95 commit 0736a0a
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 18 deletions.
10 changes: 6 additions & 4 deletions .pathplanner/settings.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
105 changes: 105 additions & 0 deletions src/main/deploy/pathplanner/autos/Source_ThreeNote.auto
Original file line number Diff line number Diff line change
@@ -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
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/Podium_MicroAdjustment.path
Original file line number Diff line number Diff line change
@@ -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
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/Source_CentralNote.path
Original file line number Diff line number Diff line change
@@ -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
}
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/Source_PodiumNote.path
Original file line number Diff line number Diff line change
@@ -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
}
30 changes: 16 additions & 14 deletions src/main/java/frc/robot/commands/Autos.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
// }



Expand All @@ -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 {
Expand Down

0 comments on commit 0736a0a

Please sign in to comment.