Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matching cameras by path ID #1015

Merged
merged 6 commits into from
Dec 4, 2023
Merged

Conversation

MrRedness
Copy link
Contributor

@MrRedness MrRedness commented Nov 20, 2023

Allows multiple cameras of the same model to be used while ensuring they stay tied to the physical camera and not the port. Matching occurs when first connecting cameras so swapping the ports while PV is running will swap the virtual cameras until a restart. Currently only tested on Linux.

@mcm001
Copy link
Contributor

mcm001 commented Nov 20, 2023

How much work is it to add a unit test that fails with the old system but passes now? Bonus points if we can copy paths and stuff from some physical cameras

@MrRedness
Copy link
Contributor Author

I don't have much experience with unit tests but I can give it a shot. Doesn't sound complex

@MrRedness MrRedness marked this pull request as ready for review November 20, 2023 22:37
@MrRedness MrRedness requested a review from a team as a code owner November 20, 2023 22:37
@MrRedness
Copy link
Contributor Author

I added a couple asserts that fail on an older version

  • Checks for proper suffix added to the second camera when it matches first camera's name
  • Ensures each config is tested by path before defaulting to name
  • Also checks that they end up matched by id rather than path if possible

@MrRedness
Copy link
Contributor Author

Any updates on testing this?

@amquake
Copy link
Member

amquake commented Dec 3, 2023

See "Multicam Test" here

@MrRedness
Copy link
Contributor Author

See "Multicam Test" here

Cool. So the only gripes you have are with the calibration side, correct? I can probably take a look at downloading/sharing calibration data between cameras when I have some time, but I imagine that's outside the scope of this PR.

@mcm001
Copy link
Contributor

mcm001 commented Dec 4, 2023

I would agree, and argue the current system is working as intended. If this code works any reason not to merge now?

@amquake
Copy link
Member

amquake commented Dec 4, 2023

This is not my doc, its from @asid61. I think the calibration should be downloadable/uploadable as mentioned, which would be a separate pr.

@MrRedness
Copy link
Contributor Author

I would agree, and argue the current system is working as intended. If this code works any reason not to merge now?

Don't see a reason personally if you feel it's safe to merge

Copy link
Contributor

@mcm001 mcm001 left a comment

Choose a reason for hiding this comment

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

We ball

@mcm001 mcm001 merged commit 6db5bc5 into PhotonVision:master Dec 4, 2023
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants