Skip to content

Commit 4d6ef86

Browse files
committed
Severn Day 1
1 parent 67a5ec1 commit 4d6ef86

File tree

14 files changed

+364
-62
lines changed

14 files changed

+364
-62
lines changed

src/main/deploy/pathplanner/autos/Shoot_And_Drive.auto

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,27 @@
66
"data": {
77
"commands": [
88
{
9-
"type": "sequential",
9+
"type": "named",
1010
"data": {
11-
"commands": [
12-
{
13-
"type": "named",
14-
"data": {
15-
"name": "Auto Launch"
16-
}
17-
}
18-
]
11+
"name": "Home"
12+
}
13+
},
14+
{
15+
"type": "named",
16+
"data": {
17+
"name": "Aim Subwoofer"
18+
}
19+
},
20+
{
21+
"type": "named",
22+
"data": {
23+
"name": "Shoot"
24+
}
25+
},
26+
{
27+
"type": "wait",
28+
"data": {
29+
"waitTime": 3.0
1930
}
2031
},
2132
{
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"version": 1.0,
3+
"startingPose": null,
4+
"command": {
5+
"type": "sequential",
6+
"data": {
7+
"commands": [
8+
{
9+
"type": "named",
10+
"data": {
11+
"name": "Home"
12+
}
13+
},
14+
{
15+
"type": "named",
16+
"data": {
17+
"name": "Aim Subwoofer"
18+
}
19+
},
20+
{
21+
"type": "named",
22+
"data": {
23+
"name": "Shoot"
24+
}
25+
},
26+
{
27+
"type": "wait",
28+
"data": {
29+
"waitTime": 3.0
30+
}
31+
},
32+
{
33+
"type": "path",
34+
"data": {
35+
"pathName": "Bottom_Head4_Source"
36+
}
37+
}
38+
]
39+
}
40+
},
41+
"folder": null,
42+
"choreoAuto": false
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"version": 1.0,
3+
"startingPose": null,
4+
"command": {
5+
"type": "sequential",
6+
"data": {
7+
"commands": [
8+
{
9+
"type": "named",
10+
"data": {
11+
"name": "Home"
12+
}
13+
},
14+
{
15+
"type": "named",
16+
"data": {
17+
"name": "Aim Subwoofer"
18+
}
19+
},
20+
{
21+
"type": "named",
22+
"data": {
23+
"name": "Shoot"
24+
}
25+
},
26+
{
27+
"type": "wait",
28+
"data": {
29+
"waitTime": 5.0
30+
}
31+
},
32+
{
33+
"type": "path",
34+
"data": {
35+
"pathName": "Middle_Grab_TopNote"
36+
}
37+
}
38+
]
39+
}
40+
},
41+
"folder": null,
42+
"choreoAuto": false
43+
}

src/main/deploy/pathplanner/autos/Test_And_Drive.auto

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"version": 1.0,
3+
"startingPose": null,
4+
"command": {
5+
"type": "sequential",
6+
"data": {
7+
"commands": [
8+
{
9+
"type": "named",
10+
"data": {
11+
"name": "Home"
12+
}
13+
},
14+
{
15+
"type": "named",
16+
"data": {
17+
"name": "Aim Subwoofer"
18+
}
19+
},
20+
{
21+
"type": "named",
22+
"data": {
23+
"name": "Shoot"
24+
}
25+
},
26+
{
27+
"type": "named",
28+
"data": {
29+
"name": "Aim Intake"
30+
}
31+
},
32+
{
33+
"type": "parallel",
34+
"data": {
35+
"commands": [
36+
{
37+
"type": "path",
38+
"data": {
39+
"pathName": "Middle_Grab_Note"
40+
}
41+
},
42+
{
43+
"type": "named",
44+
"data": {
45+
"name": "Aim Intake"
46+
}
47+
},
48+
{
49+
"type": "deadline",
50+
"data": {
51+
"commands": [
52+
{
53+
"type": "named",
54+
"data": {
55+
"name": "Pull Note"
56+
}
57+
},
58+
{
59+
"type": "named",
60+
"data": {
61+
"name": "Intake Note"
62+
}
63+
}
64+
]
65+
}
66+
}
67+
]
68+
}
69+
},
70+
{
71+
"type": "path",
72+
"data": {
73+
"pathName": "Note_Shoot_mid"
74+
}
75+
},
76+
{
77+
"type": "named",
78+
"data": {
79+
"name": "Aim Subwoofer"
80+
}
81+
},
82+
{
83+
"type": "named",
84+
"data": {
85+
"name": "Shoot"
86+
}
87+
}
88+
]
89+
}
90+
},
91+
"folder": null,
92+
"choreoAuto": false
93+
}

src/main/deploy/pathplanner/paths/Bottom_Head4_Source.path

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 5.112834841054298,
20-
"y": 0.8185908109707958
19+
"x": 2.4699559370628714,
20+
"y": 2.946926919494865
2121
},
2222
"prevControl": {
23-
"x": 4.112834841054298,
24-
"y": 0.8185908109707958
23+
"x": 1.4699559370628714,
24+
"y": 2.946926919494865
2525
},
2626
"nextControl": null,
2727
"isLocked": false,

src/main/deploy/pathplanner/paths/Middle_Grab_Note.path

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 2.446567628177991,
19+
"x": 2.8,
2020
"y": 5.531335051274091
2121
},
2222
"prevControl": {
23-
"x": 1.446567628177991,
23+
"x": 1.7999999999999998,
2424
"y": 5.531335051274091
2525
},
2626
"nextControl": null,

src/main/deploy/pathplanner/paths/Middle_Grab_TopNote.path

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"waypoints": [
44
{
55
"anchor": {
6-
"x": 1.3473171105886368,
7-
"y": 5.531335051274091
6+
"x": 0.8678567784485995,
7+
"y": 6.642279723305886
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 2.0138839138077134,
12-
"y": 6.174513545608288
11+
"x": 1.7136460393478081,
12+
"y": 6.950121838735209
1313
},
1414
"isLocked": false,
1515
"linkedName": null
@@ -20,8 +20,8 @@
2020
"y": 7.004798511021523
2121
},
2222
"prevControl": {
23-
"x": 1.8150832882862347,
24-
"y": 6.501949869996606
23+
"x": 1.6513651260920754,
24+
"y": 6.899551121039565
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -45,7 +45,7 @@
4545
"reversed": false,
4646
"folder": null,
4747
"previewStartingState": {
48-
"rotation": 0,
48+
"rotation": 57.2647737278924,
4949
"velocity": 0
5050
},
5151
"useDefaultConstraints": true
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"version": 1.0,
3+
"waypoints": [
4+
{
5+
"anchor": {
6+
"x": 2.8,
7+
"y": 5.531335051274091
8+
},
9+
"prevControl": null,
10+
"nextControl": {
11+
"x": 1.9536988922520413,
12+
"y": 5.531335051274091
13+
},
14+
"isLocked": false,
15+
"linkedName": null
16+
},
17+
{
18+
"anchor": {
19+
"x": 1.35,
20+
"y": 5.53
21+
},
22+
"prevControl": {
23+
"x": 2.35,
24+
"y": 5.53
25+
},
26+
"nextControl": null,
27+
"isLocked": false,
28+
"linkedName": null
29+
}
30+
],
31+
"rotationTargets": [],
32+
"constraintZones": [],
33+
"eventMarkers": [],
34+
"globalConstraints": {
35+
"maxVelocity": 2.7,
36+
"maxAcceleration": 2.0,
37+
"maxAngularVelocity": 540.0,
38+
"maxAngularAcceleration": 720.0
39+
},
40+
"goalEndState": {
41+
"velocity": 0,
42+
"rotation": 0,
43+
"rotateFast": false
44+
},
45+
"reversed": false,
46+
"folder": null,
47+
"previewStartingState": {
48+
"rotation": 0,
49+
"velocity": 0
50+
},
51+
"useDefaultConstraints": true
52+
}

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ object RobotContainer {
104104

105105
val launchCommand: LaunchCommand = LaunchCommand(
106106
{1.0},
107-
{ controller.leftTrigger(0.75).asBoolean }
107+
{ controller.leftTrigger(0.75).asBoolean },
108+
{ PivotSubsystem.getRelativePosition() }
108109
)
109110

110111

111112

112113

114+
115+
113116
init {
114117
// TODO: comment stuff in this function cause I'm lazy (:
115118
initializeObjects()
@@ -159,8 +162,8 @@ object RobotContainer {
159162
controller.povLeft().onTrue(autoAim) // TODO: Implement auto-aiming
160163
controller.y().onTrue(HomePivotCommand()) // TODO: Implement homing launcher
161164
controller.b().toggleOnTrue(manualPivot)
162-
controller.x().onTrue(climbCommand)
163-
controller.rightBumper().toggleOnTrue(manualClimb)
165+
controller.x().onTrue(manualClimb)
166+
// controller.rightBumper().toggleOnTrue(manualClimb)
164167
controller.rightStick().onTrue(InstantCommand(SwerveSubsystem::toggleFieldOriented))
165168
controller.button(Constants.OperatorConstants.BACK_BUTTON)
166169
.onTrue(UpdateOdometryCommand()) // TODO: Implement Toggle

0 commit comments

Comments
 (0)