Skip to content

Add an overload of resetHeadingData() which takes in a Rotation3d#2013

Merged
samfreund merged 1 commit intoPhotonVision:mainfrom
kcooney:kevin/reset-heading-data-3d
Jul 28, 2025
Merged

Add an overload of resetHeadingData() which takes in a Rotation3d#2013
samfreund merged 1 commit intoPhotonVision:mainfrom
kcooney:kevin/reset-heading-data-3d

Conversation

@kcooney
Copy link
Contributor

@kcooney kcooney commented Jul 27, 2025

Description

In PR #1933 PhotonPoseEstimator.resetHeadingData(double, Rotation2d) was added to
give users the option to manually clear the heading buffer and add an initial
heading, specified as a Rotation2d. This works for teams that pass Rotation2d data
to addHeadingData(), but teams that prefer to use Rotation3d for headings need
to provide an initial heading as a Rotation2d in order to clear the heading buffer.

This change adds an overload of resetHeadingData() that takes in a Rotation3d,
mirroring the overloads for addHeadingData().

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

@kcooney kcooney requested a review from a team as a code owner July 27, 2025 19:50
@samfreund samfreund enabled auto-merge (squash) July 27, 2025 20:35
auto-merge was automatically disabled July 27, 2025 21:20

Head branch was pushed to by a user without write access

@kcooney kcooney force-pushed the kevin/reset-heading-data-3d branch from ac69ffa to 203e87d Compare July 27, 2025 21:20
Copy link
Member

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a C++ and Python version

@Gold856 Gold856 added the photonlib Things related to the PhotonVision library label Jul 27, 2025
@kcooney
Copy link
Contributor Author

kcooney commented Jul 27, 2025

Needs a C++ and Python version

@Gold856 there are no equivalent APIs in Python or C++. Heading data is only used for PNP_DISTANCE_TRIG_SOLVE and CONSTRAINED_SOLVEPNP, neither of which is currently supported by the C++ or Python library code.

@samfreund samfreund dismissed Gold856’s stale review July 28, 2025 00:28

A very good point about feature parity needing to be extant before we can require it.

@samfreund samfreund merged commit cefaa31 into PhotonVision:main Jul 28, 2025
42 checks passed
@kcooney kcooney deleted the kevin/reset-heading-data-3d branch July 28, 2025 00:38
@kcooney
Copy link
Contributor Author

kcooney commented Jul 29, 2025

Needs a C++ and Python version

@Gold856 there are no equivalent APIs in Python or C++. Heading data is only used for PNP_DISTANCE_TRIG_SOLVE and CONSTRAINED_SOLVEPNP, neither of which is currently supported by the C++ or Python library code.

@Gold856 see PR #2015

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.

3 participants