Skip to content

Add PNP_DISTANCE_TRIG_SOLVE strategy to C++#2021

Merged
mcm001 merged 8 commits intoPhotonVision:mainfrom
cuttestkittensrule:cpp-pnp-distance-trig-solve
Aug 10, 2025
Merged

Add PNP_DISTANCE_TRIG_SOLVE strategy to C++#2021
mcm001 merged 8 commits intoPhotonVision:mainfrom
cuttestkittensrule:cpp-pnp-distance-trig-solve

Conversation

@cuttestkittensrule
Copy link
Contributor

Description

Port of the Java PNP_DISTANCE_TRIG_SOLVE strategy to C++. Includes both the actual strategy, and the unit test for it.
This is mostly identical to the Java version, with some differences listed below:

  • Like other strategies in C++, a warning is emitted upon a failure to get the position of the tag
  • A warning is emitted if Update was called, but AddHeadingData was never called
  • The unit test calls Update in a loop for every unread result like the other C++ tests for PhotonPoseEstimator

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • 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 v2024.3.1
  • 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

Based off of the implementation of the PNP_DISTANCE_TRIG_SOLVE strategy for Java
@cuttestkittensrule cuttestkittensrule requested a review from a team as a code owner August 2, 2025 04:05
@samfreund samfreund added the backend Things relating to photon-core and photon-server label Aug 4, 2025
@Gold856 Gold856 added photonlib Things related to the PhotonVision library and removed backend Things relating to photon-core and photon-server labels Aug 6, 2025
@cuttestkittensrule cuttestkittensrule force-pushed the cpp-pnp-distance-trig-solve branch from 7b3d3e7 to b27f785 Compare August 8, 2025 01:29
@cuttestkittensrule cuttestkittensrule force-pushed the cpp-pnp-distance-trig-solve branch from 79c48c5 to 350ba68 Compare August 8, 2025 02:03
@mcm001 mcm001 merged commit 8676649 into PhotonVision:main Aug 10, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants