Skip to content

Commit cc601a1

Browse files
committed
auto fixes from testing and sim
1 parent 34b641a commit cc601a1

7 files changed

Lines changed: 179 additions & 42 deletions

File tree

simgui-ds.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"keyboardJoysticks": [
3+
{
4+
"axisConfig": [
5+
{
6+
"decKey": 65,
7+
"incKey": 68
8+
},
9+
{
10+
"decKey": 87,
11+
"incKey": 83
12+
},
13+
{
14+
"decKey": 69,
15+
"decayRate": 0.0,
16+
"incKey": 82,
17+
"keyRate": 0.009999999776482582
18+
}
19+
],
20+
"axisCount": 3,
21+
"buttonCount": 4,
22+
"buttonKeys": [
23+
90,
24+
88,
25+
67,
26+
86
27+
],
28+
"povConfig": [
29+
{
30+
"key0": 328,
31+
"key135": 323,
32+
"key180": 322,
33+
"key225": 321,
34+
"key270": 324,
35+
"key315": 327,
36+
"key45": 329,
37+
"key90": 326
38+
}
39+
],
40+
"povCount": 1
41+
},
42+
{
43+
"axisConfig": [
44+
{
45+
"decKey": 74,
46+
"incKey": 76
47+
},
48+
{
49+
"decKey": 73,
50+
"incKey": 75
51+
}
52+
],
53+
"axisCount": 2,
54+
"buttonCount": 4,
55+
"buttonKeys": [
56+
77,
57+
44,
58+
46,
59+
47
60+
],
61+
"povCount": 0
62+
},
63+
{
64+
"axisConfig": [
65+
{
66+
"decKey": 263,
67+
"incKey": 262
68+
},
69+
{
70+
"decKey": 265,
71+
"incKey": 264
72+
}
73+
],
74+
"axisCount": 2,
75+
"buttonCount": 6,
76+
"buttonKeys": [
77+
260,
78+
268,
79+
266,
80+
261,
81+
269,
82+
267
83+
],
84+
"povCount": 0
85+
},
86+
{
87+
"axisCount": 0,
88+
"buttonCount": 0,
89+
"povCount": 0
90+
}
91+
],
92+
"robotJoysticks": [
93+
{},
94+
{
95+
"guid": "Keyboard0"
96+
}
97+
]
98+
}

src/main/deploy/pathplanner/autos/center to back depot side.auto

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,24 @@
1717
}
1818
},
1919
{
20-
"type": "parallel",
20+
"type": "deadline",
2121
"data": {
2222
"commands": [
2323
{
24-
"type": "named",
24+
"type": "path",
2525
"data": {
26-
"name": "intake"
26+
"pathName": "1 Depot side center"
2727
}
2828
},
2929
{
30-
"type": "path",
30+
"type": "named",
3131
"data": {
32-
"pathName": "1 Depot side center"
32+
"name": "intake"
3333
}
3434
}
3535
]
3636
}
3737
},
38-
{
39-
"type": "named",
40-
"data": {
41-
"name": "idle"
42-
}
43-
},
4438
{
4539
"type": "path",
4640
"data": {
@@ -50,13 +44,26 @@
5044
{
5145
"type": "named",
5246
"data": {
53-
"name": "shoot long"
47+
"name": "rev shooter"
5448
}
5549
},
5650
{
57-
"type": "named",
51+
"type": "parallel",
5852
"data": {
59-
"name": "idle"
53+
"commands": [
54+
{
55+
"type": "named",
56+
"data": {
57+
"name": "hopper retract"
58+
}
59+
},
60+
{
61+
"type": "named",
62+
"data": {
63+
"name": "shoot long"
64+
}
65+
}
66+
]
6067
}
6168
}
6269
]

src/main/deploy/pathplanner/autos/center to back outpost side.auto

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,24 @@
1717
}
1818
},
1919
{
20-
"type": "parallel",
20+
"type": "deadline",
2121
"data": {
2222
"commands": [
2323
{
24-
"type": "named",
24+
"type": "path",
2525
"data": {
26-
"name": "intake"
26+
"pathName": "1 Outpost side center"
2727
}
2828
},
2929
{
30-
"type": "path",
30+
"type": "named",
3131
"data": {
32-
"pathName": "1 Outpost side center"
32+
"name": "intake"
3333
}
3434
}
3535
]
3636
}
3737
},
38-
{
39-
"type": "named",
40-
"data": {
41-
"name": "idle"
42-
}
43-
},
4438
{
4539
"type": "path",
4640
"data": {
@@ -50,13 +44,26 @@
5044
{
5145
"type": "named",
5246
"data": {
53-
"name": "shoot long"
47+
"name": "rev shooter"
5448
}
5549
},
5650
{
57-
"type": "named",
51+
"type": "parallel",
5852
"data": {
59-
"name": "idle"
53+
"commands": [
54+
{
55+
"type": "named",
56+
"data": {
57+
"name": "hopper retract"
58+
}
59+
},
60+
{
61+
"type": "named",
62+
"data": {
63+
"name": "shoot long"
64+
}
65+
}
66+
]
6067
}
6168
}
6269
]

src/main/deploy/pathplanner/paths/1 Depot side center.path

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,21 @@
3434
"rotationDegrees": -58.149754025069136
3535
}
3636
],
37-
"constraintZones": [],
37+
"constraintZones": [
38+
{
39+
"name": "Constraints Zone",
40+
"minWaypointRelativePos": 0.6399186643835615,
41+
"maxWaypointRelativePos": 1.0,
42+
"constraints": {
43+
"maxVelocity": 2.5,
44+
"maxAcceleration": 2.5,
45+
"maxAngularVelocity": 540.0,
46+
"maxAngularAcceleration": 720.0,
47+
"nominalVoltage": 12.0,
48+
"unlimited": false
49+
}
50+
}
51+
],
3852
"pointTowardsZones": [],
3953
"eventMarkers": [],
4054
"globalConstraints": {

src/main/deploy/pathplanner/paths/2 Center back depot.path

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
},
1717
{
1818
"anchor": {
19-
"x": 4.0567324188374805,
20-
"y": 7.511517423211508
19+
"x": 3.9102779260481375,
20+
"y": 7.456715595885093
2121
},
2222
"prevControl": {
23-
"x": 3.890990081444429,
24-
"y": 7.324355788265967
23+
"x": 3.744535588655086,
24+
"y": 7.269553960939552
2525
},
2626
"nextControl": null,
2727
"isLocked": false,
@@ -42,7 +42,7 @@
4242
},
4343
"goalEndState": {
4444
"velocity": 0,
45-
"rotation": -90.89625075928353
45+
"rotation": -81.599031837346
4646
},
4747
"reversed": false,
4848
"folder": null,

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

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import frc.robot.commands.*;
2020
import frc.robot.config.CANMappings;
2121
import frc.robot.config.HopperConfig;
22+
import frc.robot.config.IntakeConfig;
2223
import frc.robot.config.TunerConstants;
2324
import frc.robot.subsystems.*;
2425

@@ -55,6 +56,7 @@ public class RobotContainer {
5556
.withDeadline(Commands.waitSeconds(2))));
5657

5758
public RobotContainer() {
59+
5860
NamedCommands.registerCommand(
5961
"idle",
6062
Commands.runOnce(() -> hopper.stop(), hopper)
@@ -66,22 +68,31 @@ public RobotContainer() {
6668
Commands.runEnd(
6769
() -> hopper.move(HopperConfig.HOPPER_EXTEND_ROTATION), () -> hopper.stop(), hopper)
6870
.alongWith(Commands.run(() -> System.out.println("Hopper Deployed")))
71+
.withDeadline(Commands.waitSeconds(1)));
72+
73+
NamedCommands.registerCommand(
74+
"hopper retract",
75+
Commands.runEnd(
76+
() -> hopper.move(HopperConfig.HOPPER_RETRACT_ROTATION),
77+
() -> hopper.stop(),
78+
hopper)
79+
.alongWith(Commands.run(() -> System.out.println("Hopper Retracted")))
6980
.withDeadline(Commands.waitSeconds(2)));
7081

7182
NamedCommands.registerCommand(
7283
"intake",
73-
new IntakeCommand(intake, IntakeCommand.Position.INTAKE)
74-
.withDeadline(Commands.waitSeconds(8)));
84+
Commands.run(() -> intake.intake(IntakeConfig.INTAKE_INTAKE_SPEED), intake)
85+
.alongWith(Commands.run(() -> System.out.println("Intaking"))));
86+
87+
NamedCommands.registerCommand(
88+
"rev shooter",
89+
new FlywheelCommand(flywheel, FlywheelCommand.Position.TRENCH_SHOT, drivetrain)
90+
.withDeadline(Commands.waitSeconds(1)));
7591

7692
NamedCommands.registerCommand(
7793
"shoot long",
7894
Commands.parallel(
7995
new KickerCommand(kicker, KickerCommand.Position.INTAKE),
80-
Commands.runEnd(
81-
() -> hopper.slowMove(HopperConfig.HOPPER_RETRACT_ROTATION),
82-
() -> hopper.stop(),
83-
hopper)
84-
.withDeadline(Commands.waitSeconds(2)),
8596
new IntakeCommand(intake, IntakeCommand.Position.SLOW_INTAKE),
8697
new FlywheelCommand(flywheel, FlywheelCommand.Position.TRENCH_SHOT, drivetrain))
8798
.withDeadline(Commands.waitSeconds(8)));

src/main/java/frc/robot/config/FlywheelConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class FlywheelConfig {
3333
public static final double FLYWHEEL_OUTTAKE_SPEED = 0;
3434
public static final double FLYWHEEL_HUB_SHOT_SPEED = 40;
3535
public static final double FLYWHEEL_TOWER_SHOT_SPEED = 0;
36-
public static final double FLYWHEEL_TRENCH_SHOT_SPEED = 40; // to be set later w/ testing
36+
public static final double FLYWHEEL_TRENCH_SHOT_SPEED = 65; // to be set later w/ testing
3737
public static final double FLYWHEEL_DEFAULT_SHOT_SPEED = 40;
3838
public static final double FLYWHEEL_TOLERANCE = 5;
3939
}

0 commit comments

Comments
 (0)