Class AprilTagVisionIOPhotonVision
java.lang.Object
frc.robot.subsystems.apriltagvision.io.AprilTagVisionIOPhotonVision
- All Implemented Interfaces:
AprilTagVisionIO
- Direct Known Subclasses:
AprilTagVisionIOPhotonVisionSim
AprilTagVisionIO implementation for PhotonVision cameras.
Processes camera frames to extract AprilTag observations for pose estimation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.apriltagvision.io.AprilTagVisionIO
AprilTagVisionIO.AprilTagVisionIOInputs, AprilTagVisionIO.PoseObservation, AprilTagVisionIO.TargetObservation -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.photonvision.PhotonCameraPhotonVision camera instance used to pull pipeline results.protected final edu.wpi.first.apriltag.AprilTagFieldLayoutField layout that maps AprilTag IDs to field poses.protected final doubleMaximum distance in meters from the camera to a tag before the tag is excluded from observations.protected final edu.wpi.first.math.geometry.Transform3dTransform from robot center to the camera position. -
Constructor Summary
ConstructorsConstructorDescriptionAprilTagVisionIOPhotonVision(String cameraName, edu.wpi.first.math.geometry.Transform3d robotToCamera, edu.wpi.first.apriltag.AprilTagFieldLayout fieldLayout, double maxTagDistanceMeters) Creates a PhotonVision-backed AprilTag IO implementation. -
Method Summary
Modifier and TypeMethodDescriptionvoidRefreshes the inputs structure with the latest state from the vision subsystem.
-
Field Details
-
camera
protected final org.photonvision.PhotonCamera cameraPhotonVision camera instance used to pull pipeline results. -
robotToCamera
protected final edu.wpi.first.math.geometry.Transform3d robotToCameraTransform from robot center to the camera position. -
fieldLayout
protected final edu.wpi.first.apriltag.AprilTagFieldLayout fieldLayoutField layout that maps AprilTag IDs to field poses. -
maxTagDistanceMeters
protected final double maxTagDistanceMetersMaximum distance in meters from the camera to a tag before the tag is excluded from observations.
-
-
Constructor Details
-
AprilTagVisionIOPhotonVision
public AprilTagVisionIOPhotonVision(String cameraName, edu.wpi.first.math.geometry.Transform3d robotToCamera, edu.wpi.first.apriltag.AprilTagFieldLayout fieldLayout, double maxTagDistanceMeters) Creates a PhotonVision-backed AprilTag IO implementation.- Parameters:
cameraName- name of the PhotonVision camera instancerobotToCamera- robot-to-camera transform in meters and radiansfieldLayout- AprilTag field layout used to look up tag posesmaxTagDistanceMeters- maximum distance in meters from camera to a tag; tags beyond this are excluded
-
-
Method Details
-
updateInputs
Description copied from interface:AprilTagVisionIORefreshes the inputs structure with the latest state from the vision subsystem.- Specified by:
updateInputsin interfaceAprilTagVisionIO- Parameters:
inputs- mutable inputs container to populate for logging
-