Skip to content

Commit 361e6c2

Browse files
committed
Merge branch 'main' into healthCheck
2 parents 31e3098 + c838218 commit 361e6c2

28 files changed

+797
-182
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
max_velocity = 1.5 #m/s
2+
max_acceleration = 1.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+
x = 2.02
10+
y = 0.53
11+
angle = 0.0
12+
13+
[end_pose]
14+
x = 7.07
15+
y = 0.909702
16+
angle = 0.0
17+
18+
[[internal_points]]
19+
x = 4.5
20+
y = 0.752702
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
max_velocity = 2.25 #m/s
2+
max_acceleration = 2.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+
x = 7.07
10+
y = 0.909702
11+
angle = 180.0
12+
13+
[end_pose]
14+
x = 2.02
15+
y = 1.069702
16+
angle = 180.0
17+
18+
[[internal_points]]
19+
x = 4.5
20+
y = 0.739702

src/main/deploy/paths/pieceOneFetchPath.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
max_velocity = 1.5 #m/s 3.0
2-
max_acceleration = 1.5 #m/s 2.75
2+
max_acceleration = 1.75 #m/s 2.75
33
start_velocity = 0.0 #m/s
44
end_velocity = 0.0 #m/s
55
is_reversed = false

src/main/deploy/paths/pieceOnePlacePath.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
max_velocity = 2.0 #m/s 3.0
2-
max_acceleration = 1.5 #m/s 2.75
1+
max_velocity = 3.0 #m/s 3.0
2+
max_acceleration = 2.75 #m/s 2.75
33
start_velocity = 0.0 #m/s
44
end_velocity = 0.0 #m/s
55
is_reversed = false

src/main/deploy/paths/pieceTwoToDockPath.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
max_velocity = 1.0 #m/s
1+
max_velocity = 1.5 #m/s
22
max_acceleration = 2.0 #m/s
33
start_velocity = 0.0 #m/s
44
end_velocity = 0.0 #m/s
@@ -10,7 +10,7 @@ target_yaw = 0.0 #degrees
1010
y = 4.42
1111
angle = 0.0
1212
[end_pose]
13-
x = 4.55
13+
x = 5.0
1414
y = 3.25
1515
angle = 0.0
1616
[[internal_points]]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
max_velocity = 2.25 #m/s
2+
max_acceleration = 2.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+
x = 7.07
10+
y = 0.909702
11+
angle = 180.0
12+
13+
[end_pose]
14+
x = 2.48
15+
y = 1.069702
16+
angle = 180.0
17+
18+
[[internal_points]]
19+
x = 4.5
20+
y = 0.739702

src/main/java/frc/robot/Constants.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static final class ArmConstants {
136136
public static final double kElbowIntakeMax = ElbowConstants.kForwardSoftLimit;
137137

138138
public static final double kShelfMove = 1; // FIXME put in real number
139-
public static final double kShelfTransitionMove = 0.2;
139+
public static final double kShelfTransitionMove = 0.1; // 0.2
140140
public static final double kSweepTimerElapseSeconds = 0.5;
141141
}
142142

@@ -441,7 +441,7 @@ public static final class ElbowConstants { // FIXME needs real tick values
441441
public static final double kLevelTwoConeElbow = 124_638;
442442
public static final double kLevelTwoCubeElbow = 124_638;
443443
public static final double kLevelThreeConeElbow = 177_432;
444-
public static final double kLevelThreeCubeElbow = kLevelThreeConeElbow;
444+
public static final double kLevelThreeCubeElbow = 174_432;
445445
public static final double kShelfElbow = 114_366;
446446
public static final double kFloorElbowSweep = 35_000;
447447

@@ -558,7 +558,7 @@ public static final class IntakeConstants {
558558
public static final int kExtendTalonID = 21;
559559

560560
public static final int kCloseEnoughTicks = 150;
561-
public static final int kExtendPosTicks = -2_000; // -1_800
561+
public static final int kExtendPosTicks = -2_000; // -2_000
562562
public static final int kRetractPosTicks = 0;
563563
public static final int kPickupPosTicks = -1_800; // -1_000
564564

@@ -637,6 +637,7 @@ public static class HandConstants {
637637
public static final double kRollerCubeHoldSpeed = 0.15;
638638
public static final double kRollerPickUp = 0.7;
639639
public static final double kRollerOff = 0.0;
640+
public static final double kRollerDrop = -0.1;
640641

641642
public static final double kMaxFwd = 1100; // 1100
642643
public static final double kMaxRev = -500; // -1000
@@ -718,7 +719,7 @@ public static class CompConstants {
718719
public static final double kWheelDiameterInches = 3.0 * (490 / 500.0);
719720

720721
// Elbow
721-
public static final int kElbowZeroTicks = 1155; // 730
722+
public static final int kElbowZeroTicks = 1160; // 730
722723

723724
// Shoulder
724725
public static final double kShoulderMainZeroTicks = 995;
@@ -736,7 +737,7 @@ public static class ProtoConstants {
736737
public static final double kWheelDiameterInches = 3.0 * (490 / 500.0);
737738

738739
// Elbow
739-
public static final int kElbowZeroTicks = 1130; // 730
740+
public static final int kElbowZeroTicks = 1140; // 1130
740741

741742
// Shoulder
742743
public static final double kShoulderMainZeroTicks = 1472; // FIXME old: 1836

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@
1616

1717
public class Robot extends TimedRobot {
1818
private AutoCommandInterface m_autonomousCommand;
19-
private static final Logger logger = LoggerFactory.getLogger(Robot.class);
19+
private static Logger logger;
2020

2121
private RobotContainer m_robotContainer;
2222
private boolean haveAlliance;
2323

2424
@Override
2525
public void robotInit() {
2626
m_robotContainer = new RobotContainer();
27+
logger = LoggerFactory.getLogger(Robot.class);
28+
logger.info(
29+
"Event: {}, Match Type: {}, Match #: {}, Replay #: {}",
30+
DriverStation.getEventName(),
31+
DriverStation.getMatchType(),
32+
DriverStation.getMatchNumber(),
33+
DriverStation.getReplayNumber());
2734
haveAlliance = false;
2835

2936
Shuffleboard.getTab("Match")
@@ -49,7 +56,7 @@ public void robotPeriodic() {
4956
haveAlliance = true;
5057
m_robotContainer.setAllianceColor(alliance);
5158
logger.info("Set Alliance {}", alliance);
52-
// m_robotContainer.getAutoSwitch().getAutCommand().generateTrajectory();
59+
m_robotContainer.getAutoSwitch().getAutoCommand().generateTrajectory();
5360
}
5461
}
5562
}
@@ -62,6 +69,7 @@ public void disabledInit() {
6269
@Override
6370
public void disabledPeriodic() {
6471
m_robotContainer.getAutoSwitch().checkSwitch();
72+
m_robotContainer.checkCameraOnline();
6573
}
6674

6775
@Override
@@ -71,12 +79,12 @@ public void disabledExit() {}
7179
public void autonomousInit() {
7280
logger.info("Autonomous Init");
7381
m_robotContainer.setAuto(true);
74-
// m_autonomousCommand = m_robotContainer.getAutoSwitch().getAutCommand();
75-
// if (m_autonomousCommand != null) {
76-
// if (!m_autonomousCommand.hasGenerated()) m_autonomousCommand.generateTrajectory();
77-
// m_autonomousCommand.schedule();
78-
// }
79-
m_robotContainer.getAutoCommand().schedule();
82+
m_autonomousCommand = m_robotContainer.getAutoSwitch().getAutoCommand();
83+
if (m_autonomousCommand != null) {
84+
if (!m_autonomousCommand.hasGenerated()) m_autonomousCommand.generateTrajectory();
85+
m_autonomousCommand.schedule();
86+
}
87+
// m_robotContainer.getAutoCommand().schedule();
8088
}
8189

8290
@Override
@@ -92,7 +100,7 @@ public void teleopInit() {
92100
m_autonomousCommand.cancel();
93101
}
94102
m_robotContainer.zeroElevator();
95-
// m_robotContainer.setAuto(false); commented out for now - to allow testing in Tele
103+
m_robotContainer.setAuto(false); // commented out for now - to allow testing in Tele
96104
}
97105

98106
@Override

0 commit comments

Comments
 (0)