-
Notifications
You must be signed in to change notification settings - Fork 267
Description
Describe the bug
EstimatedRobotPose in PhotonLib contains the field "targetsUsed", with the docs reading "A list of the targets used to compute this pose". However, this is often not correct.
Any of the Strategies which do not use all tags will get this wrong if there are >1 tag in the image. As far as I see, all the code just copies the targets from the input to the output. Eg. lowestAmbiguityStrategy just copies the targets (line 741 in PhotonPoseEstimator), despite the fact that it used only 1 target to compute the pose.
To Reproduce
Run with Strategy set to any but the 3 multitag ones, with the robot positioned to see multiple tags. The resulting EstimatedRobotPose will have >1 tag in the "targetUsed" list.
Simulation does work for this.
Additional context
I understand that this is a low priority bug, and maybe you don't want to change at this stage.