Skip to content

Commit ab395d2

Browse files
lots of auto tuning. trying to fix leds and still don't know why path command so weird...
1 parent 263da58 commit ab395d2

7 files changed

Lines changed: 110 additions & 63 deletions

File tree

src/main/deploy/pathplanner/autos/4pc North.auto

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,30 @@
1111
}
1212
},
1313
{
14-
"type": "sequential",
14+
"type": "parallel",
1515
"data": {
1616
"commands": [
1717
{
1818
"type": "named",
1919
"data": {
20-
"name": "AutoLeft"
20+
"name": "SlowlyRaise"
2121
}
2222
},
2323
{
24-
"type": "sequential",
24+
"type": "named",
2525
"data": {
26-
"commands": [
27-
{
28-
"type": "named",
29-
"data": {
30-
"name": "AutoL4"
31-
}
32-
}
33-
]
26+
"name": "AutoLeft"
3427
}
3528
}
3629
]
3730
}
3831
},
32+
{
33+
"type": "named",
34+
"data": {
35+
"name": "AutoL4"
36+
}
37+
},
3938
{
4039
"type": "parallel",
4140
"data": {
@@ -62,31 +61,30 @@
6261
}
6362
},
6463
{
65-
"type": "sequential",
64+
"type": "parallel",
6665
"data": {
6766
"commands": [
6867
{
6968
"type": "named",
7069
"data": {
71-
"name": "AutoLeft"
70+
"name": "HalfRaise"
7271
}
7372
},
7473
{
75-
"type": "sequential",
74+
"type": "named",
7675
"data": {
77-
"commands": [
78-
{
79-
"type": "named",
80-
"data": {
81-
"name": "AutoL4"
82-
}
83-
}
84-
]
76+
"name": "AutoLeft"
8577
}
8678
}
8779
]
8880
}
8981
},
82+
{
83+
"type": "named",
84+
"data": {
85+
"name": "AutoL4"
86+
}
87+
},
9088
{
9189
"type": "parallel",
9290
"data": {
@@ -113,31 +111,30 @@
113111
}
114112
},
115113
{
116-
"type": "sequential",
114+
"type": "parallel",
117115
"data": {
118116
"commands": [
119117
{
120118
"type": "named",
121119
"data": {
122-
"name": "AutoRight"
120+
"name": "HalfRaise"
123121
}
124122
},
125123
{
126-
"type": "sequential",
124+
"type": "named",
127125
"data": {
128-
"commands": [
129-
{
130-
"type": "named",
131-
"data": {
132-
"name": "AutoL4"
133-
}
134-
}
135-
]
126+
"name": "AutoRight"
136127
}
137128
}
138129
]
139130
}
140131
},
132+
{
133+
"type": "named",
134+
"data": {
135+
"name": "AutoL4"
136+
}
137+
},
141138
{
142139
"type": "parallel",
143140
"data": {
@@ -164,31 +161,30 @@
164161
}
165162
},
166163
{
167-
"type": "sequential",
164+
"type": "parallel",
168165
"data": {
169166
"commands": [
170167
{
171168
"type": "named",
172169
"data": {
173-
"name": "AutoRight"
170+
"name": "SlowlyRaise"
174171
}
175172
},
176173
{
177-
"type": "sequential",
174+
"type": "named",
178175
"data": {
179-
"commands": [
180-
{
181-
"type": "named",
182-
"data": {
183-
"name": "AutoL4"
184-
}
185-
}
186-
]
176+
"name": "AutoRight"
187177
}
188178
}
189179
]
190180
}
191181
},
182+
{
183+
"type": "named",
184+
"data": {
185+
"name": "AutoL4"
186+
}
187+
},
192188
{
193189
"type": "parallel",
194190
"data": {
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"version": "2025.0",
3+
"command": {
4+
"type": "sequential",
5+
"data": {
6+
"commands": [
7+
{
8+
"type": "path",
9+
"data": {
10+
"pathName": "NSource_2+3L4 Max V"
11+
}
12+
},
13+
{
14+
"type": "named",
15+
"data": {
16+
"name": "AutoLeft"
17+
}
18+
},
19+
{
20+
"type": "named",
21+
"data": {
22+
"name": "AutoL4"
23+
}
24+
},
25+
{
26+
"type": "parallel",
27+
"data": {
28+
"commands": [
29+
{
30+
"type": "named",
31+
"data": {
32+
"name": "AutoSource"
33+
}
34+
},
35+
{
36+
"type": "named",
37+
"data": {
38+
"name": "Rest"
39+
}
40+
}
41+
]
42+
}
43+
}
44+
]
45+
}
46+
},
47+
"resetOdom": true,
48+
"folder": null,
49+
"choreoAuto": false
50+
}

src/main/deploy/pathplanner/paths/NPoof_1L4 Max V.path

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
"waypoints": [
44
{
55
"anchor": {
6-
"x": 7.027339612023305,
7-
"y": 7.223202049126059
6+
"x": 7.02,
7+
"y": 6.17387784090909
88
},
99
"prevControl": null,
1010
"nextControl": {
11-
"x": 6.53873165747785,
12-
"y": 6.585020230944241
11+
"x": 6.451619318181818,
12+
"y": 5.814900568181818
1313
},
1414
"isLocked": false,
1515
"linkedName": "PoofStart"
1616
},
1717
{
1818
"anchor": {
19-
"x": 5.903181818181818,
20-
"y": 5.874730113636364
19+
"x": 5.70375,
20+
"y": 5.535696022727272
2121
},
2222
"prevControl": {
23-
"x": 6.312017045454545,
24-
"y": 6.263622159090909
23+
"x": 6.012869318181819,
24+
"y": 5.964474431818181
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -34,7 +34,7 @@
3434
"eventMarkers": [
3535
{
3636
"name": "SlowlyRaise",
37-
"waypointRelativePos": 0.1363895716292136,
37+
"waypointRelativePos": 0.0,
3838
"endWaypointRelativePos": null,
3939
"command": null
4040
}

src/main/deploy/pathplanner/paths/NSource_2+3L4 Max V.path

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"eventMarkers": [
3535
{
3636
"name": "HalfRaise",
37-
"waypointRelativePos": 0.37663857677902457,
37+
"waypointRelativePos": 0.0,
3838
"endWaypointRelativePos": null,
3939
"command": null
4040
}
@@ -48,7 +48,7 @@
4848
"unlimited": false
4949
},
5050
"goalEndState": {
51-
"velocity": 1.0,
51+
"velocity": 1.75,
5252
"rotation": -55.603007071007404
5353
},
5454
"reversed": false,

src/main/deploy/pathplanner/paths/NSource_4L4 Max V.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": 4.856164772727273,
20-
"y": 6.143963068181818
19+
"x": 4.636789772727273,
20+
"y": 6.004360795454545
2121
},
2222
"prevControl": {
23-
"x": 4.846193181818182,
24-
"y": 6.981576704545454
23+
"x": 4.626818181818182,
24+
"y": 6.841974431818182
2525
},
2626
"nextControl": null,
2727
"isLocked": false,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ public RobotContainer() {
175175

176176
NamedCommands.registerCommand(
177177
"SlowlyRaise",
178-
elevator.setElevatorPositionCommand(elevator.L4_inMotorRotations, 40, 10, 0));
178+
elevator.setElevatorPositionCommand(elevator.L4_inMotorRotations, 200, 135, 0));
179179
NamedCommands.registerCommand(
180180
"HalfRaise",
181-
elevator.setElevatorPositionCommand(elevator.L4_inMotorRotations / 2, 80, 40, 0));
181+
elevator.setElevatorPositionCommand(elevator.L4_inMotorRotations / 2, 200, 135, 0));
182182
NamedCommands.registerCommand("AutoL4", new AutoL4(elevator, mailbox));
183183
NamedCommands.registerCommand("Rest", elevator.setElevatorToRestCommand());
184184

@@ -365,7 +365,7 @@ private void configureButtonBindings() {
365365
.onTrue(
366366
Commands.runOnce(() -> climber.bringInTheClimb(), climber)
367367
.onlyIf(climber::isReadyToClimb));
368-
368+
369369
SmartDashboard.putData(
370370
"Climber Reset Button", new InstantCommand(() -> climber.goBackToRest(), climber));
371371
// operator.start().

src/main/java/frc/robot/commands/ScoreCommand.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package frc.robot.commands;
22

33
import edu.wpi.first.wpilibj2.command.Command;
4+
import edu.wpi.first.wpilibj2.command.CommandScheduler;
45
import frc.robot.MailBox;
56
import frc.robot.subsystems.elevator.Elevator;
67

@@ -47,7 +48,7 @@ public void execute() {
4748
// mailbox.nothingInIntake())
4849
if (mailboxStarted && mailbox.nothingInIntake()) {
4950
scored = true;
50-
elevator.setElevatorToRestCommand(); // Go back down
51+
CommandScheduler.getInstance().schedule(elevator.setElevatorToRestCommand()); // Go back down
5152
}
5253
}
5354

0 commit comments

Comments
 (0)