Skip to content

Commit

Permalink
146 bind auto triggers (#151)
Browse files Browse the repository at this point in the history
* Added triggers/commands

Added triggers for target arm positioning and aligning, started commands to enact them.

* Finished Auto Triggers

Also contains test path (Test-Auto Auto)

* Misc. Changes, Constants for Offset

* Shaved excess imports

* SpotlessApply

* Modified to add scoring

* weird changes

Co-authored-by: Liam P. <Sloghead11@users.noreply.github.com>

* Corrected/simplified triggers

* refactored triggers to be named commands and corrected deadline logic

* Updated with correct logic

* formatted

* final teeny eenie little bittle changes

* yay finalized stuff

---------

Co-authored-by: mmilunicmobile <mmilunicmobile@gmail.com>
Co-authored-by: Liam P. <Sloghead11@users.noreply.github.com>
Co-authored-by: Matthew Milunic <62996888+mmilunicmobile@users.noreply.github.com>
  • Loading branch information
4 people authored Feb 6, 2025
1 parent 8cf3dc1 commit aadc2cf
Show file tree
Hide file tree
Showing 15 changed files with 714 additions and 24 deletions.
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/Test Half Field.auto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"data": {
"pathName": "Half-Field Sprint"
}
},
{
"type": "named",
"data": {
"name": "height L4"
}
}
]
}
Expand Down
55 changes: 55 additions & 0 deletions src/main/deploy/pathplanner/autos/Test-Auto Auto.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "Red StartRight-SourceRight "
}
},
{
"type": "path",
"data": {
"pathName": "Red SourceRight-C_L4"
}
},
{
"type": "named",
"data": {
"name": "wait"
}
},
{
"type": "path",
"data": {
"pathName": "Red C_L4-SourceRight"
}
},
{
"type": "named",
"data": {
"name": "wait"
}
},
{
"type": "path",
"data": {
"pathName": "Red SourceRight-C_L4"
}
},
{
"type": "named",
"data": {
"name": "wait"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
61 changes: 61 additions & 0 deletions src/main/deploy/pathplanner/autos/test matthew yay.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "source to ab"
}
},
{
"type": "named",
"data": {
"name": "location B"
}
},
{
"type": "named",
"data": {
"name": "height L4"
}
},
{
"type": "named",
"data": {
"name": "place"
}
},
{
"type": "path",
"data": {
"pathName": "ab to bc"
}
},
{
"type": "named",
"data": {
"name": "location C"
}
},
{
"type": "named",
"data": {
"name": "height L2"
}
},
{
"type": "named",
"data": {
"name": "place"
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": false
}
73 changes: 73 additions & 0 deletions src/main/deploy/pathplanner/paths/Red C_L4-SourceRight.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 13.978,
"y": 5.422496749024708
},
"prevControl": null,
"nextControl": {
"x": 15.821846999144302,
"y": 5.225778445369686
},
"isLocked": false,
"linkedName": "Red Reef CD"
},
{
"anchor": {
"x": 16.216089743589745,
"y": 6.966346153846153
},
"prevControl": {
"x": 15.522569813923187,
"y": 6.416928142732595
},
"nextControl": null,
"isLocked": false,
"linkedName": "Red Source Right"
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [
{
"name": "location C",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "height L4",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "place",
"waypointRelativePos": 1.0,
"endWaypointRelativePos": null,
"command": null
}
],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 54.381510160748206
},
"reversed": false,
"folder": "AutoTest",
"idealStartingState": {
"velocity": 0,
"rotation": -122.10625595511773
},
"useDefaultConstraints": true
}
73 changes: 73 additions & 0 deletions src/main/deploy/pathplanner/paths/Red SourceRight-C_L4.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 16.216089743589745,
"y": 6.966346153846153
},
"prevControl": null,
"nextControl": {
"x": 15.471575600017074,
"y": 5.982294727572125
},
"isLocked": false,
"linkedName": "Red Source Right"
},
{
"anchor": {
"x": 13.978,
"y": 5.422496749024708
},
"prevControl": {
"x": 15.773854545219386,
"y": 5.5667511706492
},
"nextControl": null,
"isLocked": false,
"linkedName": "Red Reef CD"
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [
{
"name": "location C",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "height L4",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "place",
"waypointRelativePos": 1.0,
"endWaypointRelativePos": null,
"command": null
}
],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": -122.10625595511773
},
"reversed": false,
"folder": "AutoTest",
"idealStartingState": {
"velocity": 0,
"rotation": 54.381510160748206
},
"useDefaultConstraints": true
}
73 changes: 73 additions & 0 deletions src/main/deploy/pathplanner/paths/Red StartRight-SourceRight .path
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"version": "2025.0",
"waypoints": [
{
"anchor": {
"x": 9.972179487179487,
"y": 6.243910256410256
},
"prevControl": null,
"nextControl": {
"x": 10.777520702180267,
"y": 6.29031630098106
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 16.216089743589745,
"y": 6.966346153846153
},
"prevControl": {
"x": 13.887348178338486,
"y": 6.651331408074669
},
"nextControl": null,
"isLocked": false,
"linkedName": "Red Source Right"
}
],
"rotationTargets": [],
"constraintZones": [],
"pointTowardsZones": [],
"eventMarkers": [
{
"name": "location Source Right",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "height Source",
"waypointRelativePos": 0,
"endWaypointRelativePos": null,
"command": null
},
{
"name": "align",
"waypointRelativePos": 1.0,
"endWaypointRelativePos": null,
"command": null
}
],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0,
"nominalVoltage": 12.0,
"unlimited": false
},
"goalEndState": {
"velocity": 0,
"rotation": 54.381510160748206
},
"reversed": false,
"folder": "AutoTest",
"idealStartingState": {
"velocity": 0,
"rotation": 0.0
},
"useDefaultConstraints": true
}
Loading

0 comments on commit aadc2cf

Please sign in to comment.