Skip to content

Store calibration board measurements in native units#2480

Merged
mcm001 merged 5 commits into
PhotonVision:mainfrom
thatcomputerguy0101:mm-calibration
Jun 23, 2026
Merged

Store calibration board measurements in native units#2480
mcm001 merged 5 commits into
PhotonVision:mainfrom
thatcomputerguy0101:mm-calibration

Conversation

@thatcomputerguy0101

@thatcomputerguy0101 thatcomputerguy0101 commented May 10, 2026

Copy link
Copy Markdown
Contributor

Description

Continuation of #2479. Stores calibration measurements in native units on the UI, converting to meters when calibration is requested or inches when a calibration board is generated. Fixes some floating-point rounding problems caused by converting back and forth between the display value and the stored values that interferes with typing measurements with the unit set to mm.

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why, including events that led to this PR
  • 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 all settings going back to the previous seasons's last release (seasons end after champs ends)
  • 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
  • If this PR adds a dependency, the license has been checked for compatibility and steps taken to follow it

@thatcomputerguy0101 thatcomputerguy0101 requested a review from a team as a code owner May 10, 2026 11:09
@github-actions github-actions Bot added frontend Having to do with PhotonClient and its related items backend Things relating to photon-core and photon-server labels May 10, 2026
@thatcomputerguy0101 thatcomputerguy0101 force-pushed the mm-calibration branch 2 times, most recently from 58650d1 to c319498 Compare May 11, 2026 09:17
break;

case CalibrationBoardTypes.Charuco:
// TODO: Dynamically generate ChArUco using opencv

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I forgot I left this TODO in here. Dynamic ChArUco generation might be the topic of another PR though.

@thatcomputerguy0101 thatcomputerguy0101 changed the title Store calibration units in mm, UI input of either inches or mm Store calibration units in mm May 11, 2026
@@ -110,32 +110,32 @@ watchEffect(() => {
uniqueVideoResolutionIndex.value = currentIndex;
});
const dimensionUnit = ref<"in" | "mm">("in");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Which unit do we want to be the default?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I only kept it as inches since that's the existing behaviour.

I reckon whatever the default is should match whatever's in the board PDF.

@thatcomputerguy0101 thatcomputerguy0101 marked this pull request as draft May 16, 2026 15:37
@thatcomputerguy0101

Copy link
Copy Markdown
Contributor Author

Drafting this until #2495 is merged, since this PR has some problems that will be less redundant to fix later.

@thatcomputerguy0101 thatcomputerguy0101 changed the title Store calibration units in mm Store calibration units in native units May 24, 2026
@thatcomputerguy0101

Copy link
Copy Markdown
Contributor Author

Undrafting this since I think I separated the changes from what #2495 does enough to go in either order.

@thatcomputerguy0101 thatcomputerguy0101 marked this pull request as ready for review May 24, 2026 15:28
@thatcomputerguy0101 thatcomputerguy0101 force-pushed the mm-calibration branch 2 times, most recently from 83ffdde to 05cf70e Compare May 24, 2026 15:34
@thatcomputerguy0101 thatcomputerguy0101 changed the title Store calibration units in native units Store calibration board measurements in native units May 24, 2026
@mcm001 mcm001 enabled auto-merge (squash) May 27, 2026 05:22
@mcm001 mcm001 merged commit e41be8e into PhotonVision:main Jun 23, 2026
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants