Skip to content

Commit

Permalink
Changes for District Comp (#102)
Browse files Browse the repository at this point in the history
* Arm Trapezoid Motion Profile

* Fixed compilation error

* Cleaned up Arm API.  Removed redundant ArmIO input values

* Cleaned up Arm Subsystem Interface

* Fixed reported currentDraw in ArmIOStub

* Updated camera location based on measurements

* Add error to vision camera simulation

* Add 2d based pose estimate

* Adjust arm trapezoid profile constraints based on testing

* Add vision pose estimates to drivetrain

* Update gyro using vision

* spotlessApply

* "Drive to Amp" command (test)

* Shooter Subsystem Cleanup (#104)

* Added arm backlash compensation code (#103)

* Added 3 degree backlash compensation

* add side vision cameras (#106)

* Add left/right vision cameras

* Only run arm command when driver assist is actuating stick

* Improved 4-Note (Center) v2.0 C231

* Added 4-Note (Center) v2.1 C231 M5

* Update TestShooteAngle command to only update subsystem if the shuffleboard value has changed

* Fixed P to 8 Center Sweep Routine

* Fixed "Drive to Amp" command

* Updated "Drive to Amp" to correct yaw and decrease acceleration

* Add support for a second intake sensor (#107)

* Add support for a second intake sensor

* Made changes to drive controls

* Fixed drive to amp driver control

* Do not control arm for prepare to score when in amp mode

* Avoid using arm at all when aiming for amp

* Split rightBumper to 4 separate triggers

* Split ParallelCommands into separate scheduled commands

* Set default scoring mode to vision-based

* Recalibrate shooter camera location

---------

Co-authored-by: joshuman <[email protected]>

* Update LedSystem.java changed color from hot pink to deep pink

* Re-Measured left/right camera locations

* Remove Arm Backlash Compensation

* Updated getArmAngleFromDistance() to use 2nd-degree polynomial and latest distance/angle calibration data

* Fixed typo

* Practice Tweaks

---------

Co-authored-by: Maciej Wiczynski <[email protected]>
Co-authored-by: joshuman <[email protected]>
Co-authored-by: Adi Prajapati <[email protected]>
  • Loading branch information
4 people authored Apr 4, 2024
1 parent 327846c commit d3e9bc1
Show file tree
Hide file tree
Showing 41 changed files with 822 additions and 365 deletions.
182 changes: 182 additions & 0 deletions src/main/deploy/pathplanner/autos/4-Note (Center) v2.1 C231 M5.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
{
"version": 1.0,
"startingPose": {
"position": {
"x": 1.35,
"y": 5.55
},
"rotation": 0
},
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Score from C (Subwoofer Center)"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "C to 2"
}
},
{
"type": "named",
"data": {
"name": "Intake Piece v2.0"
}
}
]
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "2 to C"
}
},
{
"type": "named",
"data": {
"name": "Prepare to Score from C (Subwoofer Center)"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Score from C (Subwoofer Center)"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "C to 3"
}
},
{
"type": "named",
"data": {
"name": "Intake Piece v2.0"
}
}
]
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "3 to C"
}
},
{
"type": "named",
"data": {
"name": "Prepare to Score from C (Subwoofer Center)"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Score from C (Subwoofer Center)"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "C to 1"
}
},
{
"type": "named",
"data": {
"name": "Intake Piece v2.0"
}
}
]
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "1 to C"
}
},
{
"type": "named",
"data": {
"name": "Prepare to Score from C (Subwoofer Center)"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Score from C (Subwoofer Center)"
}
},
{
"type": "parallel",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "C to 5"
}
},
{
"type": "named",
"data": {
"name": "Intake Piece v2.0"
}
}
]
}
},
{
"type": "named",
"data": {
"name": "Turn off Shooter and Intake"
}
}
]
}
},
"folder": null,
"choreoAuto": false
}
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/1 to 7.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 2.6,
"y": 3.9
"x": 2.65,
"y": 4.0
},
"prevControl": null,
"nextControl": {
"x": 2.6,
"y": 2.9
"x": 2.6500000000000004,
"y": 3.0
},
"isLocked": true,
"linkedName": "\"1\" Wing Podium Note"
Expand Down
14 changes: 7 additions & 7 deletions src/main/deploy/pathplanner/paths/1 to C.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
"waypoints": [
{
"anchor": {
"x": 2.6,
"y": 3.9
"x": 2.65,
"y": 4.0
},
"prevControl": null,
"nextControl": {
"x": 2.246446609406726,
"y": 4.253553390593275
"x": 2.2964466094067273,
"y": 4.353553390593277
},
"isLocked": true,
"linkedName": "\"1\" Wing Podium Note"
},
{
"anchor": {
"x": 1.35,
"x": 1.75,
"y": 5.55
},
"prevControl": {
"x": 1.7035533905932736,
"x": 2.103553390593273,
"y": 5.196446609406726
},
"nextControl": null,
"isLocked": true,
"linkedName": "\"C\" Subwoofer (Center Side)"
"linkedName": "\"C\" Subwoofer (Center Side) - No Sub Touch"
}
],
"rotationTargets": [
Expand Down
6 changes: 3 additions & 3 deletions src/main/deploy/pathplanner/paths/2 to C.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
},
{
"anchor": {
"x": 1.35,
"x": 1.75,
"y": 5.55
},
"prevControl": {
"x": 1.85,
"x": 2.25,
"y": 5.55
},
"nextControl": null,
"isLocked": true,
"linkedName": "\"C\" Subwoofer (Center Side)"
"linkedName": "\"C\" Subwoofer (Center Side) - No Sub Touch"
}
],
"rotationTargets": [],
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/3 to 5.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
{
"anchor": {
"x": 7.873688005440527,
"y": 5.777446393602466
"x": 8.0,
"y": 5.75
},
"prevControl": {
"x": 6.967380218403877,
"y": 6.200064655343165
"x": 7.09369221296335,
"y": 6.172618261740699
},
"nextControl": null,
"isLocked": true,
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/3 to Between 2-3.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 2.7,
"y": 6.8
"x": 2.75,
"y": 6.75
},
"prevControl": null,
"nextControl": {
"x": 2.1767288353915135,
"y": 6.669526014370095
"x": 2.2267288353915133,
"y": 6.619526014370095
},
"isLocked": false,
"linkedName": "\"3\" Wing Amp Note (45 degrees)"
Expand Down
14 changes: 7 additions & 7 deletions src/main/deploy/pathplanner/paths/3 to C.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
"waypoints": [
{
"anchor": {
"x": 2.7,
"y": 6.8
"x": 2.75,
"y": 6.75
},
"prevControl": null,
"nextControl": {
"x": 2.3464466094067262,
"y": 6.446446609406726
"x": 2.396446609406726,
"y": 6.396446609406726
},
"isLocked": true,
"linkedName": "\"3\" Wing Amp Note (45 degrees)"
},
{
"anchor": {
"x": 1.35,
"x": 1.75,
"y": 5.55
},
"prevControl": {
"x": 1.7035533905932738,
"x": 2.103553390593274,
"y": 5.903553390593274
},
"nextControl": null,
"isLocked": true,
"linkedName": "\"C\" Subwoofer (Center Side)"
"linkedName": "\"C\" Subwoofer (Center Side) - No Sub Touch"
}
],
"rotationTargets": [
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/5 to 3.path
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"waypoints": [
{
"anchor": {
"x": 7.873688005440527,
"y": 5.777446393602466
"x": 8.0,
"y": 5.75
},
"prevControl": null,
"nextControl": {
"x": 6.907762179151458,
"y": 6.036265438704987
"x": 7.034074173710931,
"y": 6.008819045102522
},
"isLocked": true,
"linkedName": "\"5\" Center Amp Mid Note"
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/7 to 1.path
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
},
{
"anchor": {
"x": 2.6,
"y": 3.9
"x": 2.65,
"y": 4.0
},
"prevControl": {
"x": 2.6,
"y": 2.9
"x": 2.6500000000000004,
"y": 3.0
},
"nextControl": null,
"isLocked": false,
Expand Down
8 changes: 4 additions & 4 deletions src/main/deploy/pathplanner/paths/Between 2-3 to 3.path
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
},
{
"anchor": {
"x": 2.7,
"y": 6.8
"x": 2.75,
"y": 6.75
},
"prevControl": {
"x": 2.3229504000992742,
"y": 6.5233044496623345
"x": 2.372950400099274,
"y": 6.473304449662335
},
"nextControl": null,
"isLocked": false,
Expand Down
Loading

0 comments on commit d3e9bc1

Please sign in to comment.