photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Open up pose estimator strategy methods

Open Gold856 opened this issue 1 month ago • 0 comments

Description

PhotonPoseEstimator has some rather leaky abstractions surrounding the processing of pipeline results. Pose caching makes attempts at comparing the same result with different strategies nearly impossible, and the singular update method with several optional arguments is error prone when you need to provide data for strategies like Constrained SolvePnP, as you can completely miss passing those arguments. Constrained SolvePnP itself has some abstraction leaks due to needing a seed pose, and it currently uses either the multi-tag result, or the multi-tag fallback, which is leaky and inflexible.

Following the design laid out in #1835, all the strategies have now been opened up into their own methods, giving the user complete control over how they want to use a pipeline result. All formerly optional arguments have either been removed for strategies that don't need them, or required for the strategies that do need them. All the old PoseStrategy and update methods have been deprecated for backwards compatibility, except for Python, which is very behind in terms of API parity, which this PR intends to help fix.

Closes #1805, closes #1835, closes #2239.

Meta

Merge checklist:

  • [x] Pull Request title is short, imperative summary of proposed changes
  • [x] The description documents the what and why
  • [x] If this PR changes behavior or adds a feature, user documentation is updated
  • [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • [ ] If this PR addresses a bug, a regression test for it is added

Gold856 avatar Dec 17 '25 09:12 Gold856