Skip to content

Conversation

@ElectricTurtle32
Copy link
Contributor

@ElectricTurtle32 ElectricTurtle32 commented Nov 4, 2025

Description

Camera focus tool pipeline using a Laplacian and finding the variance. Similar to Limelight.

closes #1597

Meta

Merge checklist:

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

@ElectricTurtle32 ElectricTurtle32 requested a review from a team as a code owner November 4, 2025 16:54
@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 Nov 4, 2025
@samfreund
Copy link
Member

This PR has been linted.

Just a reminder 😄

@samfreund samfreund marked this pull request as draft November 4, 2025 16:57
@samfreund
Copy link
Member

solves #1597

just a heads up, this won't actually close the issue. You need to use the keyword closes instead of solves.

@github-actions github-actions bot added the documentation Anything relating to https://docs.photonvision.org label Nov 10, 2025
@ElectricTurtle32 ElectricTurtle32 marked this pull request as ready for review November 10, 2025 21:42
Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

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

We should warn teams that refocusing can lead to their calibration being invalidated.

It seems like we're changing the resolution when we change into focus mode, expected behavior for teams would probably be keeping the same resolution or picking the resolution for focus mode. I'm also unsure of whether this affects focus, if it does it's important to note.

We should consider the case where the focus pipeline is left on by accident, perhaps add a warning/popup modal on the dashboard. If this is implemented here, it should also be done for the calibration mode.

It doesn't seem like the highest focus value is saved and displayed, I believe the intent was to do so. Feel free to correct me if this has changed.

Copy link
Member

@samfreund samfreund left a comment

Choose a reason for hiding this comment

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

It still doesn't seem that we're saving and displaying the highest focus value, that's something that I think would be helpful and we can save. Otherwise, it's looking pretty good. I left some comments on things that need to get cleaned up, but most of them are nits, so it should be pretty quick to clear up. Also, make sure you remember to lint 😄

samfreund
samfreund previously approved these changes Nov 16, 2025
Copy link
Collaborator

@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.

Thanks for working through this!

Copy link
Collaborator

@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.

Just some consistency things.

@Gold856 Gold856 enabled auto-merge (squash) November 16, 2025 23:53
@Gold856 Gold856 changed the title Add Camera Focus Tool Add Camera Focus Mode Nov 16, 2025
@Gold856 Gold856 merged commit 618072c into PhotonVision:main Nov 17, 2025
41 checks passed
samfreund added a commit to samfreund/photonvision that referenced this pull request Nov 23, 2025
@Gold856 Gold856 mentioned this pull request Nov 24, 2025
8 tasks
Gold856 added a commit that referenced this pull request Nov 24, 2025
## Description

#2180 added an additional value to PipelineType.java. Enums are
serialized with `ordinal()`, and the frontend wasn't updated to account
for this, causing an off-by-one error where the UI thought the pipeline
was actually the next pipeline over. This resyncs the enum on the
frontend to the backend and adjusts the mapping from PipelineType to
WebsocketPipelineType to make everything match.

Fixes #2201.

closes #2202 

## 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_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] 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
- [x] 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
samfreund pushed a commit to samfreund/photonvision that referenced this pull request Dec 18, 2025
## Description

PhotonVision#2180 added an additional value to PipelineType.java. Enums are
serialized with `ordinal()`, and the frontend wasn't updated to account
for this, causing an off-by-one error where the UI thought the pipeline
was actually the next pipeline over. This resyncs the enum on the
frontend to the backend and adjusts the mapping from PipelineType to
WebsocketPipelineType to make everything match.

Fixes PhotonVision#2201.

closes PhotonVision#2202 

## 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_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] 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
- [x] 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
spacey-sooty pushed a commit to spacey-sooty/photonvision that referenced this pull request Dec 22, 2025
## Description
 
Camera focus tool pipeline using a Laplacian and finding the variance.
Similar to Limelight.


closes PhotonVision#1597 

## 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_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [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
- [x] 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
spacey-sooty pushed a commit to spacey-sooty/photonvision that referenced this pull request Dec 22, 2025
## Description

PhotonVision#2180 added an additional value to PipelineType.java. Enums are
serialized with `ordinal()`, and the frontend wasn't updated to account
for this, causing an off-by-one error where the UI thought the pipeline
was actually the next pipeline over. This resyncs the enum on the
frontend to the backend and adjusts the mapping from PipelineType to
WebsocketPipelineType to make everything match.

Fixes PhotonVision#2201.

closes PhotonVision#2202 

## 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_
- [x] This PR has been
[linted](https://docs.photonvision.org/en/latest/docs/contributing/linting.html).
- [ ] 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
- [x] 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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a lens focus assist tool

4 participants