Skip to content

Disallow low-resolution calibration#2390

Closed
cswilson252 wants to merge 42 commits intoPhotonVision:mainfrom
cswilson252:noLowResolutionCal
Closed

Disallow low-resolution calibration#2390
cswilson252 wants to merge 42 commits intoPhotonVision:mainfrom
cswilson252:noLowResolutionCal

Conversation

@cswilson252
Copy link
Copy Markdown
Contributor

Description

What changed? Why? (the code + comments should speak for itself on the "how")

Adds a snackbar message (error) in CameraCalibrationCard if calibration resolution is < 640x480, because there's not enough useful data for calibration at that scale.

Closes #1719

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

@cswilson252 cswilson252 requested a review from a team as a code owner March 8, 2026 22:59
@github-actions github-actions Bot added the frontend Having to do with PhotonClient and its related items label Mar 8, 2026
@Bankst
Copy link
Copy Markdown
Member

Bankst commented Mar 9, 2026

Would a total pixel count (area) be a better metric than a specific vert/horiz pixel count cutoff?

@mcm001
Copy link
Copy Markdown
Contributor

mcm001 commented Mar 9, 2026

I think that area, or maybe diagonal length in pixels to keep the units in pixels, are better than just width or height?

Comment thread photon-client/src/components/cameras/CameraCalibrationCard.vue Outdated
@cswilson252
Copy link
Copy Markdown
Contributor Author

note to self: use a computed property to filter the dropdown here - and probably adjust the units to pixels?

@cswilson252
Copy link
Copy Markdown
Contributor Author

alright, i've made currentRes a computed property for total area, just trying to figure out where to filter the dropdown..

@mcm001
Copy link
Copy Markdown
Contributor

mcm001 commented Apr 20, 2026

You'd do that by modifying getUniqueVideoFormatsByResolution to filter out things you don't want I believe

@mcm001
Copy link
Copy Markdown
Contributor

mcm001 commented Apr 20, 2026

@cswilson252 cswilson252 requested a review from mcm001 April 21, 2026 02:57
Comment thread photon-client/src/components/cameras/CameraCalibrationCard.vue Outdated
Comment thread photon-client/src/components/cameras/CameraCalibrationCard.vue Outdated
@samfreund
Copy link
Copy Markdown
Member

This should probably target 27, you'll want to rebase as well.

cswilson252 and others added 11 commits April 21, 2026 22:57
We've had a couple people who didn't find it clear that multiple
coprocessors required different static IP addresses, so this PR aims to
clarify that point in the docs.
…ion#2393)

Fixes a bug where offline update did not start after confirming the
dev-version warning dialog.

The confirm action was using an incorrect file reference in template
context, so the selected JAR was not passed correctly to the upload
handler. The dialog closed, but no upload request was sent.
This change corrects the confirm handler so the selected file is passed
properly and the upload/install flow starts as expected.
## Description

Back in
PhotonVision#467 (comment)
and
https://discord.com/channels/725836368059826228/725846784131203222/974498049609056266
we added code to poke our NT client every 5 seconds to "clicking the
save button in the settings window makes Photon show up again over
networktables". Total hack, but it seemed to work. We didn't at the time
dig any deeper in Wireshark or debug-level NT logs.

<img width="1373" height="679" alt="image"
src="https://github.com/user-attachments/assets/8cb2102e-0bae-4bfd-b9ac-55d31f8421b6"
/>

Now, it's 2026. 4 years on from the OG bug. And this code seems linked
to these issues

-
https://www.chiefdelphi.com/t/photonvision-coprocessor-not-sending-data-can-t-change-networking/516356/5
-
https://www.chiefdelphi.com/t/photonvision-network-tables-known-issue/515966

Craig collected these log files as well:


[craig-nt-never-connects.zip](https://github.com/user-attachments/files/26001809/craig-nt-never-connects.zip)

The code path that handles TCP re-connection was also changed entirely
since we first added this workaround. Regardless this hack was not
removed as part of the NT3 to NT4 upgrade:
- pre-NT4, reconnection was handled by `TCPConnector::connect_parallel`
which delegates to `TCPConnector`. This uses raw socket APIs
- post-NT4, reconnect is handled by `ParallelTcpConnector`. This uses
libuv exclusively

@crschardt did some really great debugging with a rio and radio in the
loop with a luma p1. In this test setup, removing this code improves
stability markedly. I'd still like to get this more on robot time, as
well as try to understand from Peter why we might have needed this code
in the first place.

## Changes

- Remove periodic stop/restart of NetworkTables client every 5 seconds
if `NetworkTablesInstance::isConnected` returns false.

## Meta

Merge checklist:
- [ ] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) 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

---------

Co-authored-by: Craig Schardt <crschardt@fastem.com>
…mulation (PhotonVision#2372)

## Description

compute confidence level based on target area in total image size and
populate classId and confidence level in Java (while building the
PhotonTrackedTarget)

## Changes
- Add new VisionTargetSim constructor for object detection
- If class ID specified but confidence = -1, estimate based on total
area

---------

Co-authored-by: Matt Morley <matthew.morley.ca@gmail.com>
As a precursor to PhotonVision#2394, add a bunch of linting rules to try and catch
more mistakes/potential code errors/unnecessary code. Add a bunch of
rules from https://eslint.vuejs.org/rules/ in the "uncategorized"
section that seem useful to have.
The current method for checking light vs. dark mode is to compare the
name of the theme against a hardcoded string. This PR uses a dark mode
boolean. This change is for verbosity and so that we're not reliant on
theme name. Additionally, we change some references to colors to the
global theme, instead of indexing the list of themes.
I assume based off discord comments a PR won't be accepted for a
shell.nix or equivalent flake solution so we should gitignore this so
people don't accidentally add them to PRs
Bobcat66 and others added 23 commits April 21, 2026 23:14
## Description

Leadership team identified gaps in how we introduce new developers to
the community.

Additional docs for onboarding new developers, helping clarify roles and
what counts as a "good" PR.

## Meta

Merge checklist:
- [ X] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [ X] 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
On a Luma P1, autoexposure on first boot was getting overridden with the manual exposure setting. This was traced back to PhotonVision#1814, where the order of setting auto exposure and raw exposure was flipped. This flips it back.
Signed-off-by: Jade Turner <spacey-sooty@proton.me>
## Description

Added systemcore to a couple of build files in order for `./gradlew
publishToMavenLocal` to generate systemcore-compatible dependencies.

Needed to support deploying photonlib to systemcore.

## Meta

Merge checklist:
- [x] Pull Request title is [short, imperative
summary](https://cbea.ms/git-commit/) of proposed changes
- [x] 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

---------

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
…#2416)

Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com>
Co-authored-by: Jade Turner <spacey-sooty@proton.me>
Co-authored-by: Jordan McMichael <jlmcmchl@gmail.com>
This PR updates everything for 2027. This includes removing GradleRIO, simplifying our wpilib version defintion, updating APIs, updating to Java 21, and more.

Note that photonlibpy is failing because robotpy has not been fully updated yet. Examples are omitted because they need to be updated for our new PhotonPoseEstimator API and still need some changes from WPILIB. photonlib windows build is failing because we're waiting for some upstream changes. Finally, images are failing since they don't have Java 21 yet.
We added new API methods in 2026, and deprecated our past methods. This PR removes the deprecated methods.
@cswilson252 cswilson252 requested a review from a team as a code owner April 22, 2026 03:15
@github-actions github-actions Bot added documentation Anything relating to https://docs.photonvision.org website anything relating to https://photonvision.org photonlib Things related to the PhotonVision library backend Things relating to photon-core and photon-server labels Apr 22, 2026
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 documentation Anything relating to https://docs.photonvision.org frontend Having to do with PhotonClient and its related items photonlib Things related to the PhotonVision library website anything relating to https://photonvision.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow low-resolution calibration