File tree Expand file tree Collapse file tree
src/main/java/frc/robot/subsystems/vision Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313import edu .wpi .first .math .geometry .Pose3d ;
1414import edu .wpi .first .units .measure .Distance ;
1515import edu .wpi .first .wpilibj .Alert ;
16+ import edu .wpi .first .wpilibj .RobotState ;
1617import edu .wpi .first .wpilibj .Alert .AlertType ;
1718import edu .wpi .first .wpilibj2 .command .Command ;
1819import edu .wpi .first .wpilibj2 .command .SubsystemBase ;
@@ -36,6 +37,7 @@ public static enum IntegrationBehavior {
3637 private final CameraIOInputsAutoLogged [] inputs_ ;
3738
3839 private final Alert [] alerts_ ;
40+ private final Alert noTags_ = new Alert ("There are 0 visible apriltags." , AlertType .kWarning );
3941
4042 private boolean enabled_ ; // Whether or not vision pose estimation is enabled
4143
@@ -166,6 +168,8 @@ public void periodic() {
166168 }
167169 }
168170
171+ noTags_ .set (tagCount == 0 && VisionConstants .useQuest );
172+
169173 Logger .recordOutput ("Vision/Summary/TagPoses" , summaryTagPoses .toArray (new Pose3d [0 ]));
170174 Logger .recordOutput ("Vision/Summary/BotPoses/All" , estimateListToPoseArray (poseEstimates ));
171175 Logger .recordOutput ("Vision/Summary/BotPoses/Accepted" , estimateListToPoseArray (acceptedEstimates ));
You can’t perform that action at this time.
0 commit comments