From 5dfb4efebab3086dddef2431d85d0d344c545e6e Mon Sep 17 00:00:00 2001 From: Alvin Zhang <41vin2h4n9@gmail.com> Date: Mon, 29 Jan 2024 18:32:12 -0800 Subject: [PATCH] fix: actually fix null vision poses --- .../robot2024/subsystems/vision/AprilTagVision.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/team1540/robot2024/subsystems/vision/AprilTagVision.java b/src/main/java/org/team1540/robot2024/subsystems/vision/AprilTagVision.java index 0146a01c..d64a7737 100644 --- a/src/main/java/org/team1540/robot2024/subsystems/vision/AprilTagVision.java +++ b/src/main/java/org/team1540/robot2024/subsystems/vision/AprilTagVision.java @@ -18,8 +18,10 @@ public class AprilTagVision extends SubsystemBase { private final Consumer visionPoseConsumer; - private TimestampedVisionPose frontPose; - private TimestampedVisionPose rearPose; + private TimestampedVisionPose frontPose = + new TimestampedVisionPose(-1, new Pose2d(), new int[0], new Pose2d[0]); + private TimestampedVisionPose rearPose = + new TimestampedVisionPose(-1, new Pose2d(), new int[0], new Pose2d[0]); public AprilTagVision( AprilTagVisionIO frontCameraIO,