Skip to content

Commit

Permalink
Note detection fieldrelative (#8)
Browse files Browse the repository at this point in the history
* Port note vision from retep nr/note-detection

* Make note aligned drive command

* Revert "Merge branch 'main' into note-detection"

This reverts commit 974ad00, reversing
changes made to ac7eb66.

* deadbanding alignment + filters

* Port note vision from retep nr/note-detection

* Make note aligned drive command

* Revert "Merge branch 'main' into note-detection"

This reverts commit 974ad00, reversing
changes made to ac7eb66.

* deadbanding alignment + filters

* Merge main into note-detection

* Merge main into note-detection

* Remove random Settings.NoteAlignment

* Note detection code

* Make note translation field relative (unfinished)

* Fix note field relative positioning

* remove turn stream from note aligned drive, add center to intake front constant

* Update method name

* Add note detectionn test auto

* Add DriveToAutoStart

* Add NaN and large value check to odometry

* Use distance to determine isFinished

* Tune values

* Run other side autons

* add SwerveDriveDriveToChain for test

* Fix swervedrive to chain

---------

Co-authored-by: Naowal Rahman <naowal.ar@gmail.com>
Co-authored-by: Ivan Chen <ivanchen07@gmail.com>
Co-authored-by: Keobkeig <angela.xue3@gmail.com>
  • Loading branch information
4 people authored Feb 10, 2024
1 parent 0848677 commit a81a877
Show file tree
Hide file tree
Showing 25 changed files with 722 additions and 86 deletions.
4 changes: 2 additions & 2 deletions .pathplanner/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"HFE"
],
"autoFolders": [],
"defaultMaxVel": 3.0,
"defaultMaxAccel": 3.0,
"defaultMaxVel": 2.0,
"defaultMaxAccel": 4.0,
"defaultMaxAngVel": 540.0,
"defaultMaxAngAccel": 720.0,
"maxModuleSpeed": 4.5
Expand Down
43 changes: 43 additions & 0 deletions src/main/deploy/pathplanner/autos/Note Detection Test.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.3033866247492334,
"y": 6.814737809886499
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "intake acquire"
}
},
{
"type": "path",
"data": {
"pathName": "Note Detection Path"
}
},
{
"type": "named",
"data": {
"name": "drive to note"
}
},
{
"type": "named",
"data": {
"name": "intake stop"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/B To A (ABC).path
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand Down
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/C To B (ABC).path
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand Down
14 changes: 7 additions & 7 deletions src/main/deploy/pathplanner/paths/E To Shoot (HFE).path
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
{
"anchor": {
"x": 3.976354741378645,
"y": 5.106639879824356
"x": 3.4613550257373955,
"y": 5.349605268437967
},
"prevControl": {
"x": 5.288791546143204,
"y": 4.49370079566982
"x": 4.746249330823314,
"y": 4.380929158993735
},
"nextControl": null,
"isLocked": false,
Expand All @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 9.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand All @@ -45,5 +45,5 @@
"reversed": false,
"folder": "HFE",
"previewStartingState": null,
"useDefaultConstraints": false
"useDefaultConstraints": true
}
20 changes: 10 additions & 10 deletions src/main/deploy/pathplanner/paths/F To Shoot (HFE).path
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 7.929545854615797,
"x": 8.12,
"y": 2.432016158384531
},
"prevControl": null,
"nextControl": {
"x": 6.995066434251791,
"x": 7.185520579635994,
"y": 3.4562610112362155
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 3.8814838652626524,
"y": 4.827042510937235
"x": 3.4,
"y": 5.21
},
"prevControl": {
"x": 4.259643243410917,
"y": 4.815422774902082
"x": 4.524927668353058,
"y": 4.997546496479711
},
"nextControl": null,
"isLocked": false,
Expand All @@ -32,18 +32,18 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 9.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0.0,
"rotation": -13.0,
"rotation": -7.742166844819546,
"rotateFast": false
},
"reversed": false,
"folder": "HFE",
"previewStartingState": null,
"useDefaultConstraints": false
"useDefaultConstraints": true
}
18 changes: 9 additions & 9 deletions src/main/deploy/pathplanner/paths/FShoot To E (HFE).path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 3.8814838652626524,
"y": 4.827042510937235
"x": 3.4,
"y": 5.21
},
"prevControl": null,
"nextControl": {
"x": 5.639808720888058,
"y": 4.489969784247294
"x": 4.787004771012038,
"y": 4.42620908196786
},
"isLocked": false,
"linkedName": null
Expand All @@ -20,8 +20,8 @@
"y": 4.097291348201403
},
"prevControl": {
"x": 6.460969663475785,
"y": 4.359129446883026
"x": 6.165251635651925,
"y": 4.174203465458797
},
"nextControl": null,
"isLocked": false,
Expand All @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 9.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand All @@ -45,5 +45,5 @@
"reversed": false,
"folder": "HFE",
"previewStartingState": null,
"useDefaultConstraints": false
"useDefaultConstraints": true
}
22 changes: 11 additions & 11 deletions src/main/deploy/pathplanner/paths/H To Shoot (HFE).path
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 7.940567464034234,
"y": 0.7841651445745021
"x": 8.12,
"y": 0.91
},
"prevControl": null,
"nextControl": {
"x": 5.970951958009818,
"y": 1.1314614999083628
"x": 6.09651200885518,
"y": 1.3734386164887789
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 2.932248020664661,
"y": 3.0409052404747614
"x": 2.5372885306588757,
"y": 3.23
},
"prevControl": {
"x": 4.464336906902614,
"y": 1.7553300211016838
"x": 4.555375655754567,
"y": 1.9908154535276095
},
"nextControl": null,
"isLocked": false,
Expand All @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 9.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand All @@ -45,5 +45,5 @@
"reversed": false,
"folder": "HFE",
"previewStartingState": null,
"useDefaultConstraints": false
"useDefaultConstraints": true
}
20 changes: 10 additions & 10 deletions src/main/deploy/pathplanner/paths/HShoot To F (HFE).path
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"waypoints": [
{
"anchor": {
"x": 2.932248020664661,
"y": 3.0409052404747614
"x": 2.54,
"y": 3.23
},
"prevControl": null,
"nextControl": {
"x": 5.429728048854969,
"y": 1.1066294807828339
"x": 5.3948334681608605,
"y": 1.3399464381665318
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 7.929545854615797,
"x": 8.12,
"y": 2.432016158384531
},
"prevControl": {
"x": 7.178392770949869,
"y": 2.432016158384531
"x": 6.386539843490928,
"y": 1.755946563650941
},
"nextControl": null,
"isLocked": false,
Expand All @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 4.5,
"maxAcceleration": 9.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand All @@ -45,5 +45,5 @@
"reversed": false,
"folder": "HFE",
"previewStartingState": null,
"useDefaultConstraints": false
"useDefaultConstraints": true
}
49 changes: 49 additions & 0 deletions src/main/deploy/pathplanner/paths/Note Detection Path.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 1.3033866247492334,
"y": 6.814737809886499
},
"prevControl": null,
"nextControl": {
"x": 2.421420613499129,
"y": 6.814737809886499
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 3.9788388950331144,
"y": 5.384346760266148
},
"prevControl": {
"x": 3.3859563993722896,
"y": 6.314936615260962
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 1.0,
"rotation": -40.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": null,
"useDefaultConstraints": false
}
4 changes: 2 additions & 2 deletions src/main/deploy/pathplanner/paths/Start To C (ABC).path
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxVelocity": 2.0,
"maxAcceleration": 4.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
Expand Down
Loading

0 comments on commit a81a877

Please sign in to comment.