Skip to content

Commit

Permalink
Diagonal joystick scaling (#36)
Browse files Browse the repository at this point in the history
* Increased rotation speed

* Scale joysticks for full speed drivign on diagonals

* Tested at stemnasium

* Auto path changes

* chore: updated venderdep and WPILib

* fix?: distance sensor update and can simulate robot now

* FEAT: replaced rev2mdistancesensor with color sensor
tested but should look over

* Broken Path

* We want a timer if the distance sensor decides to not work

* Enable on teleop-compressor

* Toggle compressor start+rightbumper

* yes

* chore: added toggle functionality for the color sensor

* fix: use IR value from color sensor instead

* Final changes

---------

Co-authored-by: Anay Nagar <[email protected]>
Co-authored-by: WILLIAM WANG <[email protected]>
  • Loading branch information
3 people authored Mar 23, 2024
1 parent d675f31 commit 58d7ed9
Show file tree
Hide file tree
Showing 25 changed files with 324 additions and 113 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "java"
id "edu.wpi.first.GradleRIO" version "2024.3.1"
id "edu.wpi.first.GradleRIO" version "2024.3.2"
}

java {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"version": 1.0,
"startingPose": {
"position": {
"x": 1.55744644822623,
"y": 6.0
"x": 0.75,
"y": 3.0
},
"rotation": 0
},
Expand Down
75 changes: 75 additions & 0 deletions src/main/deploy/pathplanner/autos/1+0.5-SourceSide-Leave.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 0.8,
"y": 4.4
},
"rotation": -60.0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Shoot"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Intake"
}
},
{
"type": "path",
"data": {
"pathName": "Middle5thNote"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Intake in"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Prep-Speed - 60%"
}
},
{
"type": "path",
"data": {
"pathName": "5thNote-Back"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Outtake"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/autos/1-AmpSide-Leave.auto
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"version": 1.0,
"startingPose": {
"position": {
"x": 0.7516461186768542,
"y": 4.35
"x": 0.75,
"y": 6.75
},
"rotation": -60.0
"rotation": 60.0
},
"command": {
"type": "sequential",
Expand All @@ -24,7 +24,7 @@
{
"type": "path",
"data": {
"pathName": "MoveOut-Right"
"pathName": "MoveOut-Left"
}
}
]
Expand Down
17 changes: 8 additions & 9 deletions src/main/deploy/pathplanner/autos/2-Center-Stays.auto
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@
"name": "Shoot"
}
},
{
"type": "named",
"data": {
"name": "Intake out"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "sequential",
"type": "path",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "CenterNote-Center"
}
}
]
"pathName": "CenterNote-Center"
}
},
{
Expand Down
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/2-SourceSide-Leave.auto
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
]
}
},
{
"type": "named",
"data": {
"name": "Intake in"
}
},
{
"type": "named",
"data": {
Expand Down
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/3-Center-Stays.auto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
"name": "Shoot"
}
},
{
"type": "named",
"data": {
"name": "Intake out"
}
},
{
"type": "deadline",
"data": {
Expand Down
6 changes: 0 additions & 6 deletions src/main/deploy/pathplanner/autos/4-Center-Stays.auto
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@
"name": "Intake out"
}
},
{
"type": "deadline",
"data": {
"commands": []
}
},
{
"type": "deadline",
"data": {
Expand Down
52 changes: 52 additions & 0 deletions src/main/deploy/pathplanner/paths/5thNote-Back.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 8.0,
"y": 0.75
},
"prevControl": null,
"nextControl": {
"x": 7.346710693421388,
"y": 1.0261620523241057
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 5.0,
"y": 1.25
},
"prevControl": {
"x": 5.436099261932909,
"y": 0.6271857083288086
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": -30.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": 0,
"velocity": 0
},
"useDefaultConstraints": true
}
12 changes: 6 additions & 6 deletions src/main/deploy/pathplanner/paths/LeftNote-Center.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@
},
{
"anchor": {
"x": 2.75,
"x": 2.9,
"y": 6.5
},
"prevControl": {
"x": 2.760368651393246,
"y": 5.421660255102424
"x": 2.909614940148025,
"y": 5.5000462246053825
},
"nextControl": {
"x": 2.740133057189191,
"x": 2.890133057189191,
"y": 7.526162052324105
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 1.35,
"x": 1.4,
"y": 5.52
},
"prevControl": {
"x": 3.249810371265829,
"x": 3.2998103712658287,
"y": 5.52
},
"nextControl": null,
Expand Down
22 changes: 11 additions & 11 deletions src/main/deploy/pathplanner/paths/Middle5thNote-Right.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@
"waypoints": [
{
"anchor": {
"x": 0.75,
"y": 4.35
"x": 0.8,
"y": 4.4
},
"prevControl": null,
"nextControl": {
"x": 1.2709445330007911,
"y": 1.3955767409633761
"x": 1.3209445330007905,
"y": 1.4455767409633768
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.043316855864482,
"x": 8.05,
"y": 0.7104198823782273
},
"prevControl": {
"x": 7.043316855864482,
"x": 7.050000000000001,
"y": 0.7104198823782273
},
"nextControl": {
"x": 9.04331685586447,
"x": 9.049999999999988,
"y": 0.7104198823782273
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 0.75,
"y": 4.35
"x": 0.8,
"y": 4.4
},
"prevControl": {
"x": 1.2709445330007911,
"y": 1.3955767409633757
"x": 1.320944533000791,
"y": 1.4455767409633768
},
"nextControl": null,
"isLocked": false,
Expand Down
58 changes: 58 additions & 0 deletions src/main/deploy/pathplanner/paths/Middle5thNote.path
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"version": 1.0,
"waypoints": [
{
"anchor": {
"x": 0.8,
"y": 4.4
},
"prevControl": null,
"nextControl": {
"x": 1.3209445330007905,
"y": 1.4455767409633768
},
"isLocked": false,
"linkedName": null
},
{
"anchor": {
"x": 8.0,
"y": 0.75
},
"prevControl": {
"x": 7.0,
"y": 0.75
},
"nextControl": null,
"isLocked": false,
"linkedName": null
}
],
"rotationTargets": [
{
"waypointRelativePos": 0.85,
"rotationDegrees": 0,
"rotateFast": false
}
],
"constraintZones": [],
"eventMarkers": [],
"globalConstraints": {
"maxVelocity": 3.0,
"maxAcceleration": 3.0,
"maxAngularVelocity": 540.0,
"maxAngularAcceleration": 720.0
},
"goalEndState": {
"velocity": 0,
"rotation": 0.0,
"rotateFast": false
},
"reversed": false,
"folder": null,
"previewStartingState": {
"rotation": -60.067304943288455,
"velocity": 0
},
"useDefaultConstraints": true
}
Loading

0 comments on commit 58d7ed9

Please sign in to comment.