getEstimatedPose

fun Pair<PhotonModule, PhotonPipelineResult>.getEstimatedPose(prevEstimatedRobotPose: Pose2d): EstimatedRobotPose?

Extension function for a Pair of PhotonModule and PhotonPipelineResult to get estimated poses.

This function sets the reference pose for the pose estimator of the PhotonModule and updates it with the PhotonPipelineResult. If an EstimatedRobotPose is present, it adds it to the list of poses.

Receiver

Pair of PhotonModule and PhotonPipelineResult The pair of PhotonModule and PhotonPipelineResult.

Return

EstimatedRobotPose? The estimated robot pose, or null if not present.

Parameters

prevEstimatedRobotPose

Pose2d The previous estimated robot pose to set as reference.