Skip to content

Commit f1cf4d0

Browse files
authored
Merge pull request #111 from strykeforce/4or5ThenWing3ThenSearch
4or5 then wing3 then search
2 parents 3655202 + aaa2a40 commit f1cf4d0

32 files changed

+838
-118
lines changed

src/main/deploy/paths/MiddleInitial1_WingNote1.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ max_acceleration = 3.0 #m/s
33
start_velocity = 0.0 #m/s
44
end_velocity = 0.0 #m/s
55
is_reversed = false
6-
target_yaw = 26.6 #degrees - old 22.0
6+
target_yaw = 13.0 #degrees - old 26.6
77

88
[start_pose]
99
dataPoint = "MI1"
1010
dX = 0.0
11-
dY = 0.0
12-
angle = 0.0
11+
dY = 0.25
12+
angle = 30.0
1313

1414
[end_pose]
1515
dataPoint "W1"
1616
dX = -0.1
17-
dY = -0.35
18-
angle = 26.6
17+
dY = 0.05
18+
angle = 13.0
1919

2020
[[internal_points]]
2121
x = 1.9
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
max_velocity = 5.0 #m/s
2+
max_acceleration = 3.0 #m/s
3+
start_velocity = 0.0 #m/s
4+
end_velocity = 0.0 #m/s
5+
is_reversed = false
6+
target_yaw = -34.439 #degrees
7+
8+
[start_pose]
9+
dataPoint = "M4"
10+
dX = -0.3
11+
dY = 0.55
12+
angle = 180.0
13+
14+
[end_pose]
15+
dataPoint = "NAS4"
16+
angle = 143.27
17+
18+
[[internal_points]]
19+
x = 5.56
20+
y = 1.8
21+
22+
[[internal_points]]
23+
x = 2.483
24+
y = 3.154
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
max_velocity = 5.0 #m/s
2+
max_acceleration = 3.0 #m/s
3+
start_velocity = 0.0 #m/s
4+
end_velocity = 0.0 #m/s
5+
is_reversed = false
6+
target_yaw = -34.439 #degrees
7+
8+
[start_pose]
9+
dataPoint = "M5"
10+
dX = -0.5
11+
dY = 0.35
12+
13+
[end_pose]
14+
dataPoint = "NAS4"
15+
16+
[[internal_points]]
17+
x = 5.021
18+
y = 1.395
19+
20+
[[internal_points]]
21+
x = 2.483
22+
y = 3.154

src/main/deploy/paths/MiddleShoot3_WingNote3.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ target_yaw = -30.0 #degrees
1111
[end_pose]
1212
dataPoint = "W3"
1313
dX = 0.1
14-
dY = 0.15
14+
dY = 0.2
1515
angle = -30.0
1616

1717
[[internal_points]]

src/main/deploy/paths/NonAmpInitial1_MiddleNote4.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ target_yaw = 0.0 #degrees
1010

1111
[end_pose]
1212
dataPoint = "M4"
13-
dX = -0.5
14-
dY = 0.75
13+
dX = -0.3
14+
dY = 0.55
1515
angle = 0.0
1616

1717

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
max_velocity = 5.0 #m/s
2+
max_acceleration = 3.0 #m/s
3+
start_velocity = 0.0 #m/s
4+
end_velocity = 0.0 #m/s
5+
is_reversed = false
6+
target_yaw = 0.0 #degrees
7+
8+
[start_pose]
9+
dataPoint = "NAS4"
10+
angle = -36.72
11+
12+
[end_pose]
13+
dataPoint = "M4"
14+
angle = 0.0
15+
16+
[[internal_points]]
17+
x = 2.71
18+
y = 2.8
19+
20+
[[internal_points]]
21+
x = 5.56
22+
y = 2.0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
max_velocity = 5.0 #m/s
2+
max_acceleration = 3.0 #m/s
3+
start_velocity = 0.0 #m/s
4+
end_velocity = 0.0 #m/s
5+
is_reversed = false
6+
target_yaw = 0.0 #degrees
7+
8+
[start_pose]
9+
dataPoint = "NAS4"
10+
11+
[end_pose]
12+
dataPoint = "M5"
13+
14+
[[internal_points]]
15+
x = 5.021
16+
y = 1.395
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
max_velocity = 3.0 #m/s
2+
max_acceleration = 2.5 #m/s
3+
start_velocity = 0.0 #m/s
4+
end_velocity = 0.0 #m/s
5+
is_reversed = false
6+
target_yaw = 0.0 #degrees
7+
8+
[start_pose]
9+
dataPoint = "NAS4"
10+
angle = 0.0
11+
[end_pose]
12+
dataPoint = "W3"
13+
dX = -0.1
14+
dY = 0.0
15+
angle = 0.0
16+
17+
[[internal_points]]
18+
x = 2.2
19+
y = 4.11

src/main/java/frc/robot/Robot.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package frc.robot;
66

77
import ch.qos.logback.classic.util.ContextInitializer;
8+
import com.ctre.phoenix6.SignalLogger;
89
import edu.wpi.first.wpilibj.DigitalInput;
910
import edu.wpi.first.wpilibj.DriverStation;
1011
import edu.wpi.first.wpilibj.DriverStation.Alliance;
@@ -147,6 +148,7 @@ public void autonomousExit() {
147148

148149
@Override
149150
public void teleopInit() {
151+
SignalLogger.start();
150152
m_robotContainer.enableDeadeye();
151153
logger.info("Teleop Init | Match #{}", DriverStation.getMatchNumber());
152154
m_robotContainer.setIsAuto(false);

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
import frc.robot.subsystems.magazine.MagazineSubsystem;
114114
import frc.robot.subsystems.pathHandler.PathHandler;
115115
import frc.robot.subsystems.robotState.RobotStateSubsystem;
116+
import frc.robot.subsystems.robotState.RobotStateSubsystem.FeedMode;
116117
import frc.robot.subsystems.robotState.RobotStateSubsystem.RobotStates;
117118
import frc.robot.subsystems.shooter.ShooterIOFX;
118119
import frc.robot.subsystems.shooter.ShooterSubsystem;
@@ -327,7 +328,7 @@ public RobotContainer() {
327328
configureTuningDashboard();
328329
robotStateSubsystem.setAllianceColor(Alliance.Blue);
329330

330-
RobotController.setBrownoutVoltage(6.3);
331+
RobotController.setBrownoutVoltage(5.75); // 6.3, want test 5.75
331332

332333
// configureTelemetry();
333334
// configurePitDashboard();
@@ -641,6 +642,13 @@ private void configureMatchDashboard() {
641642
.withPosition(5, 2)
642643
.withSize(1, 1);
643644

645+
allianceColor =
646+
Shuffleboard.getTab("Match")
647+
.addBoolean(
648+
"Middle Pass Mode?", () -> robotStateSubsystem.getFeedMode() == FeedMode.MIDDLE)
649+
.withSize(1, 1)
650+
.withPosition(5, 3);
651+
644652
allianceColor =
645653
Shuffleboard.getTab("Match")
646654
.addBoolean("AllianceColor", () -> alliance != Alliance.Blue)
@@ -848,7 +856,9 @@ public void setAllianceColor(Alliance alliance) {
848856
allianceColor.withProperties(Map.of("colorWhenTrue", "red", "colorWhenFalse", "blue"));
849857
robotStateSubsystem.setAllianceColor(alliance);
850858

859+
driveSubsystem.setRecordTrajectoryAllowed(true);
851860
autoSwitch.getAutoCommand().generateTrajectory();
861+
driveSubsystem.setRecordTrajectoryAllowed(false);
852862

853863
// Flips gyro angle if alliance is red team
854864
if (robotStateSubsystem.getAllianceColor() == Alliance.Red) {
@@ -907,7 +917,9 @@ private void configureOperatorBindings() {
907917

908918
// UnJam Note
909919
new JoystickButton(xboxController, XboxController.Button.kLeftStick.value)
910-
.onTrue(new UnJamUpperNoteCommand(magazineSubsystem));
920+
.onTrue(
921+
new UnJamUpperNoteCommand(magazineSubsystem, intakeSubsystem, robotStateSubsystem)
922+
.withTimeout(0.5));
911923

912924
// Open Loop Elbow
913925
// new Trigger((() -> xboxController.getRightY() > RobotConstants.kJoystickDeadband))

0 commit comments

Comments
 (0)