Skip to content

Commit f28612b

Browse files
authored
Merge pull request #106 from errorcodexero/work_april_2
Work april 2
2 parents dc58e45 + ebbffe1 commit f28612b

8 files changed

Lines changed: 262 additions & 45 deletions

File tree

src/main/deploy/pathplanner/paths/a5CollectLoop2(loopie).path renamed to src/main/deploy/pathplanner/paths/a7CollectLoop.path

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,56 +8,72 @@
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 3.9234084117797794,
12-
"y": 5.258754148807581
11+
"x": 3.362907698818017,
12+
"y": 5.328997170250767
1313
},
1414
"isLocked": false,
1515
"linkedName": "a5LoopShoot"
1616
},
1717
{
1818
"anchor": {
19-
"x": 7.792755323561947,
19+
"x": 6.708995782632744,
2020
"y": 5.368689988938053
2121
},
2222
"prevControl": {
23-
"x": 7.373079525779589,
24-
"y": 6.539593022210406
23+
"x": 5.36582152527449,
24+
"y": 6.343308618284048
2525
},
2626
"nextControl": {
27-
"x": 8.004585274377915,
28-
"y": 4.777680611559139
27+
"x": 7.359081995435712,
28+
"y": 4.896981921121975
2929
},
3030
"isLocked": false,
3131
"linkedName": null
3232
},
3333
{
3434
"anchor": {
35-
"x": 6.970961939988938,
36-
"y": 4.465526721515486
35+
"x": 6.708995782632744,
36+
"y": 2.9864684043141585
3737
},
3838
"prevControl": {
39-
"x": 8.193042254437715,
40-
"y": 3.511669505878289
39+
"x": 7.697838255014892,
40+
"y": 2.580282702370341
4141
},
4242
"nextControl": {
43-
"x": 6.101025719026548,
44-
"y": 5.144528691924779
43+
"x": 5.825374028251257,
44+
"y": 3.349432711148226
4545
},
4646
"isLocked": false,
4747
"linkedName": null
4848
},
4949
{
5050
"anchor": {
51-
"x": 4.681115182522125,
52-
"y": 5.668036573561946
51+
"x": 6.129280835176992,
52+
"y": 4.461494607300884
5353
},
5454
"prevControl": {
55-
"x": 5.639121266592921,
56-
"y": 5.64160045630531
55+
"x": 6.156139549466578,
56+
"y": 4.0372859451716305
5757
},
5858
"nextControl": {
59-
"x": 3.728392890984115,
60-
"y": 5.694326884898057
59+
"x": 6.1024221208874065,
60+
"y": 4.885703269430138
61+
},
62+
"isLocked": false,
63+
"linkedName": null
64+
},
65+
{
66+
"anchor": {
67+
"x": 4.654466848727876,
68+
"y": 5.592790652654867
69+
},
70+
"prevControl": {
71+
"x": 5.071713567647901,
72+
"y": 5.52944676656619
73+
},
74+
"nextControl": {
75+
"x": 4.067828395426444,
76+
"y": 5.681850572544342
6177
},
6278
"isLocked": false,
6379
"linkedName": null
@@ -68,33 +84,37 @@
6884
"y": 5.368689988938053
6985
},
7086
"prevControl": {
71-
"x": 2.8778707569951325,
72-
"y": 5.292815724664674
87+
"x": 2.8839161907194075,
88+
"y": 5.275951112520585
7389
},
7490
"nextControl": null,
7591
"isLocked": false,
76-
"linkedName": "a5LoopShoot"
92+
"linkedName": null
7793
}
7894
],
7995
"rotationTargets": [
8096
{
8197
"waypointRelativePos": 0.5972188995215311,
8298
"rotationDegrees": -22.77253519883315
8399
},
100+
{
101+
"waypointRelativePos": 1.0519386574074077,
102+
"rotationDegrees": -56.98406371610071
103+
},
84104
{
85105
"waypointRelativePos": 1.7967115097160609,
86-
"rotationDegrees": -102.12464780763888
106+
"rotationDegrees": 165.52779753636696
87107
},
88108
{
89-
"waypointRelativePos": 2.5,
90-
"rotationDegrees": -38.095099380259605
109+
"waypointRelativePos": 3.0,
110+
"rotationDegrees": 134.27333953270954
91111
}
92112
],
93113
"constraintZones": [
94114
{
95115
"name": "Constraints Zone",
96-
"minWaypointRelativePos": 2.5812305900621126,
97-
"maxWaypointRelativePos": 3.46074340062112,
116+
"minWaypointRelativePos": 3.15,
117+
"maxWaypointRelativePos": 4.46074340062112,
98118
"constraints": {
99119
"maxVelocity": 2.0,
100120
"maxAcceleration": 3.0,
@@ -118,19 +138,21 @@
118138
}
119139
}
120140
],
121-
"pointTowardsZones": [
141+
"pointTowardsZones": [],
142+
"eventMarkers": [
143+
{
144+
"name": "startintake",
145+
"waypointRelativePos": 0.6701276077291383,
146+
"endWaypointRelativePos": null,
147+
"command": null
148+
},
122149
{
123-
"fieldPosition": {
124-
"x": 4.5974,
125-
"y": 4.035
126-
},
127-
"rotationOffset": 0.0,
128-
"minWaypointRelativePos": 3.339334239130434,
129-
"maxWaypointRelativePos": 4.0,
130-
"name": "Point Towards Zone"
150+
"name": "stopintake",
151+
"waypointRelativePos": 3.584024452804379,
152+
"endWaypointRelativePos": null,
153+
"command": null
131154
}
132155
],
133-
"eventMarkers": [],
134156
"globalConstraints": {
135157
"maxVelocity": 2.5,
136158
"maxAcceleration": 3.0,
@@ -141,13 +163,13 @@
141163
},
142164
"goalEndState": {
143165
"velocity": 0,
144-
"rotation": -41.428979515269766
166+
"rotation": -41.79210441429713
145167
},
146168
"reversed": false,
147-
"folder": "T2NZ2TSameAlt",
169+
"folder": "CooperativeDepot",
148170
"idealStartingState": {
149171
"velocity": 0,
150-
"rotation": -41.428979515269766
172+
"rotation": -41.42897951526977
151173
},
152174
"useDefaultConstraints": false
153175
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"version": "2025.0",
3+
"waypoints": [
4+
{
5+
"anchor": {
6+
"x": 0.682,
7+
"y": 7.15
8+
},
9+
"prevControl": null,
10+
"nextControl": {
11+
"x": 0.6820000000000002,
12+
"y": 6.15
13+
},
14+
"isLocked": false,
15+
"linkedName": "CollectDepotStart"
16+
},
17+
{
18+
"anchor": {
19+
"x": 0.668,
20+
"y": 5.6
21+
},
22+
"prevControl": {
23+
"x": 0.668,
24+
"y": 6.209319597164331
25+
},
26+
"nextControl": {
27+
"x": 0.668,
28+
"y": 4.990680402835668
29+
},
30+
"isLocked": false,
31+
"linkedName": "CollectDepotInner"
32+
},
33+
{
34+
"anchor": {
35+
"x": 3.116,
36+
"y": 5.369
37+
},
38+
"prevControl": {
39+
"x": 2.1735160398230096,
40+
"y": 4.853859513274335
41+
},
42+
"nextControl": null,
43+
"isLocked": false,
44+
"linkedName": "a5LoopShoot"
45+
}
46+
],
47+
"rotationTargets": [
48+
{
49+
"waypointRelativePos": 1,
50+
"rotationDegrees": -119.99999999999999
51+
}
52+
],
53+
"constraintZones": [
54+
{
55+
"name": "Intake",
56+
"minWaypointRelativePos": 0,
57+
"maxWaypointRelativePos": 0.800786593707251,
58+
"constraints": {
59+
"maxVelocity": 0.8,
60+
"maxAcceleration": 1.5,
61+
"maxAngularVelocity": 540.0,
62+
"maxAngularAcceleration": 720.0,
63+
"nominalVoltage": 12.0,
64+
"unlimited": false
65+
}
66+
}
67+
],
68+
"pointTowardsZones": [
69+
{
70+
"fieldPosition": {
71+
"x": 4.5974,
72+
"y": 4.034536
73+
},
74+
"rotationOffset": 0.0,
75+
"minWaypointRelativePos": 1.7439722982216141,
76+
"maxWaypointRelativePos": 2.0,
77+
"name": "Point Towards Zone"
78+
}
79+
],
80+
"eventMarkers": [
81+
{
82+
"name": "stopintake",
83+
"waypointRelativePos": 1.4608947503419971,
84+
"endWaypointRelativePos": null,
85+
"command": null
86+
}
87+
],
88+
"globalConstraints": {
89+
"maxVelocity": 3.0,
90+
"maxAcceleration": 2.0,
91+
"maxAngularVelocity": 540.0,
92+
"maxAngularAcceleration": 720.0,
93+
"nominalVoltage": 12.0,
94+
"unlimited": false
95+
},
96+
"goalEndState": {
97+
"velocity": 0,
98+
"rotation": -41.42897951526977
99+
},
100+
"reversed": false,
101+
"folder": "CooperativeDepot",
102+
"idealStartingState": {
103+
"velocity": 0,
104+
"rotation": -119.99999999999999
105+
},
106+
"useDefaultConstraints": false
107+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "2025.0",
3+
"waypoints": [
4+
{
5+
"anchor": {
6+
"x": 3.6584133711283187,
7+
"y": 6.005278968473451
8+
},
9+
"prevControl": null,
10+
"nextControl": {
11+
"x": 2.2699642563357614,
12+
"y": 6.63784165139431
13+
},
14+
"isLocked": false,
15+
"linkedName": null
16+
},
17+
{
18+
"anchor": {
19+
"x": 0.682,
20+
"y": 7.15
21+
},
22+
"prevControl": {
23+
"x": 1.6802532288177803,
24+
"y": 6.773093005718346
25+
},
26+
"nextControl": null,
27+
"isLocked": false,
28+
"linkedName": "CollectDepotStart"
29+
}
30+
],
31+
"rotationTargets": [],
32+
"constraintZones": [],
33+
"pointTowardsZones": [],
34+
"eventMarkers": [],
35+
"globalConstraints": {
36+
"maxVelocity": 2.0,
37+
"maxAcceleration": 1.5,
38+
"maxAngularVelocity": 540.0,
39+
"maxAngularAcceleration": 720.0,
40+
"nominalVoltage": 12.0,
41+
"unlimited": false
42+
},
43+
"goalEndState": {
44+
"velocity": 0,
45+
"rotation": -119.99999999999999
46+
},
47+
"reversed": false,
48+
"folder": "CooperativeDepot",
49+
"idealStartingState": {
50+
"velocity": 0,
51+
"rotation": 180.0
52+
},
53+
"useDefaultConstraints": false
54+
}

src/main/deploy/pathplanner/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
"holonomicMode": true,
55
"pathFolders": [
66
"DepotAuto",
7-
"Trench NZ Depot",
7+
"CooperativeDepot",
88
"PreloadOnly",
99
"T2NZ2TSame",
1010
"T2NZ2TSameAlt",
1111
"TestCollect",
12+
"Trench NZ Depot",
1213
"Trench2Trench"
1314
],
1415
"autoFolders": [],

src/main/java/frc/robot/RobotContainer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public RobotContainer() {
249249
autoChooser_ = new LoggedDashboardChooser<>("Auto Choices");
250250

251251
autoChooser_.addDefaultOption("Neutral Zone Loop W/ Depot", AutoCommands.a6CollectNZDepot(drivebase_, shooter_, intake_, hopper_));
252+
autoChooser_.addOption("Cooperative Depot Auto", AutoCommands.a7CoopDepot(drivebase_, shooter_, intake_, hopper_));
252253
autoChooser_.addOption("Neutral Zone Loop - Left Trench", AutoCommands.a5CollectNZ(drivebase_, shooter_, intake_, hopper_, false));
253254
autoChooser_.addOption("Neutral Zone Loop - Right Trench", AutoCommands.a5CollectNZ(drivebase_, shooter_, intake_, hopper_, true));
254255
autoChooser_.addOption("Preload Only (untested)", AutoCommands.a4OnlyPreload(drivebase_, shooter_, intake_, hopper_));
@@ -304,8 +305,8 @@ private void configureBindings() {
304305

305306
// When the shooter isnt shooting, get it ready to shoot.
306307
shooter_.setDefaultCommand(shooter_.spinUpVelocityCommand(() -> {
307-
var shift = HubShiftUtil.getOfficialShiftInfo();
308-
return shift.active() ? RotationsPerSecond.of(50) : RotationsPerSecond.zero();
308+
return RotationsPerSecond.zero();
309+
// return HubShiftUtil.getOfficialShiftInfo().active() ? RotationsPerSecond.of(50) : RotationsPerSecond.zero();
309310
}));
310311

311312
//While the X button is held, the intake will run the eject sequence. If it the intake is stowed, it will also deploy it.

src/main/java/frc/robot/RobotState.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public static void periodic() {
7070
inAllianceZone = currentPose.getMeasureX().minus(allianceWall).abs(Meters) < ShooterConstants.Positions.spinUpZone.in(Meters);
7171

7272
// Other logging
73-
7473
Logger.recordOutput("ShiftInfo", HubShiftUtil.getOfficialShiftInfo());
7574

7675
LoggedTracer.record("RobotState");

0 commit comments

Comments
 (0)