Photon Vision
The PhotonVision class is a subsystem that interfaces with multiple PhotonVision cameras to provide vision tracking and pose estimation capabilities. This subsystem is a Singleton that manages multiple CameraModules and selects the best result based on pose ambiguity.
This subsystem provides methods to get the estimated global pose of the robot, the distance to targets, and the yaw of detected AprilTags. It also provides methods to check if a tag is visible and get the pivot position based on distance calculations.
Properties
Functions
Link copied to clipboard
Gets the current tracked target.
Link copied to clipboard
Calculates the straight-line distance to the currently tracked AprilTag.
Link copied to clipboard
Gets the estimated global pose of the robot as a Transform3d.
Gets the estimated global pose of the robot using the best available camera.
Link copied to clipboard
Returns the Singleton instance of this PhotonVision subsystem.
Link copied to clipboard
Calculates the pivot position based on the distance to the AprilTag.
Link copied to clipboard
Gets the current target pose ambiguity.