photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Take calib snapshots in a loop

Open samfreund opened this issue 2 months ago • 3 comments

Description

Instead of requiring users to click the snapshot button each time they want to grab an image, we now take snapshots whenever we have a target in the image. All of this is done in the frontend, so no backend changes are needed.

See here for an example.

Meta

Merge checklist:

  • [x] Pull Request title is short, imperative summary 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 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

samfreund avatar Oct 23 '25 03:10 samfreund

I don't think there are any other places where the front end does significant thinking or state maintenance. Are we sure that pure front end is the right place for this feature to land?

mcm001 avatar Oct 23 '25 05:10 mcm001

I don't think there are any other places where the front end does significant thinking or state maintenance. Are we sure that pure front end is the right place for this feature to land?

I don't think we gain anything by implementing it in the backend, although I'll grant your point that it does add state maintenance. I chose to put it in the frontend because all it does is repeatedly send an image, which was previously something only the frontend can do. We could change it so that the backend requests the image, but that doesn't follow the previous implementation where the user sends the image from the frontend.

samfreund avatar Oct 23 '25 05:10 samfreund

Waiting on tests that this doesn't make a significant difference in calibration quality.

samfreund avatar Nov 01 '25 02:11 samfreund