PhotonModule

class PhotonModule(val cameraName: String, val cameraPos: Transform3d, fieldLayout: AprilTagFieldLayout)

The PhotonModule class represents a single Photonvision camera setup with its associated pose estimator and position information.

Constructors

Link copied to clipboard
constructor(cameraName: String, cameraPos: Transform3d, fieldLayout: AprilTagFieldLayout)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val allUnreadResults: MutableList<PhotonPipelineResult>

Retrieves all unread results from the PhotonCamera.

Link copied to clipboard
val camera: PhotonCamera

The PhotonCamera instance for this module.

Link copied to clipboard

The name of the camera.

Link copied to clipboard
val cameraPos: Transform3d

The position of the camera.

Link copied to clipboard
var currentStdDevs: Matrix<N3, N1>?

The current standard deviations for 2D pose estimation.

Link copied to clipboard
var currentStdDevs3d: Matrix<N4, N1>?

The current standard deviations for 3D pose estimation.

Link copied to clipboard
val poseEstimator: PhotonPoseEstimator

The PhotonPoseEstimator instance for estimating the robot's pose.

Functions

Link copied to clipboard
fun updateEstimatedStdDevs(estimatedPose: Optional<EstimatedRobotPose>, targets: List<PhotonTrackedTarget>, singleTargetVector: Matrix<N3, N1> = DEFAULT_SINGLE_TARGET_STD_DEVS_2D, multiTargetVector: Matrix<N3, N1> = DEFAULT_MULTI_TARGET_STD_DEVS_2D)

Updates the estimated standard deviations based on the provided estimated pose and targets.

Link copied to clipboard
fun updateEstimatedStdDevs3d(estimatedPose: Optional<EstimatedRobotPose>, targets: List<PhotonTrackedTarget>, singleTargetVector: Matrix<N4, N1> = DEFAULT_SINGLE_TARGET_STD_DEVS_3D, multiTargetVector: Matrix<N4, N1> = DEFAULT_MULTI_TARGET_STD_DEVS_3D)

Updates the estimated 3D standard deviations.