11package frc .robot .subsystems .vision ;
22
3- import edu .wpi .first .math .geometry .Pose3d ;
43import edu .wpi .first .math .geometry .Rotation2d ;
5- import edu .wpi .first .math .geometry .Translation3d ;
4+ import edu .wpi .first .math .geometry .Translation2d ;
65import org .littletonrobotics .junction .AutoLog ;
76
87public interface VisionIO {
98 @ AutoLog
10- public static class VisionIOInputs {
9+ class VisionIOInputs {
1110 public boolean connected = false ;
1211 public PoseObservation latestTargetObservation =
13- new PoseObservation (0 , new Translation3d (), 0 );
12+ new PoseObservation (0 , new Translation2d (), 0 );
1413 public int lastestTagID = 0 ;
1514 public double distanceFromTarget = 0 ;
1615 public double yaw = 0 ;
1716 }
1817
1918
2019 /** Represents the angle to a simple target, not used for pose estimation. */
21- public static record TargetObservation (Rotation2d tx , Rotation2d ty ) {}
20+ record TargetObservation (Rotation2d tx , Rotation2d ty ) {}
2221
2322 /** Represents a robot pose sample used for pose estimation. */
24- public static record PoseObservation (
23+ record PoseObservation (
2524 int tagID ,
26- Translation3d translation3d ,
25+ Translation2d translation2d ,
2726 double yaw
2827 ){}
2928
30- public static enum PoseObservationType {
29+ enum PoseObservationType {
3130 PHOTONVISION
3231 }
3332
3433 default void updateInputs (VisionIOInputs inputs ) {}
35- }
34+ }
0 commit comments