-
Notifications
You must be signed in to change notification settings - Fork 196
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
Another config matching bug #1518
Conversation
Of dmekkfkskskksjfjd course. Thanks V4L. Will dig in tonight |
} else if (device.getIsV4lCsiCamera()) { | ||
} else if (device.otherPaths.length == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double else-if - syntax error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skill issue, this is a complete statement, just a confusing one with an empty body. add a comment
// If cscore hasnt passed this other paths aka a path by id or a path as in usb port then we | ||
// cant guarantee it is a valid camera. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to make any assertions to check that otherPaths does not contain "by-id" or "by-path", or will the otherPaths length always be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. This specific problem is hard to recreate. I believe if we get either a by-id or by-path we should be good to assume we can read from the camera.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to merge this as-is, or explicitly check only that there are no by-ids or by-paths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im fine doing it as is
photon-targeting/src/main/java/org/photonvision/common/hardware/Platform.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send it
This is quite an odd issue/fix.
So this is what happened... Photonvision booted with the camera connected and the camera was working...
After a short time the camera stopped working (for some reason maybe static, maybe temp, maybe wiring, idk).
During this time pv showed
Jul 04 06:25:18 BackLeft java[643]: [2024-07-04 06:25:18] [CSCore - PvCSCoreLogger] [ERROR] CS: ERROR 40: ioctl VIDIOC_QBUF failed at UsbCameraImpl.cpp:723: Invalid argument (UsbUtil.cpp:156)
Jul 04 06:25:18 BackLeft java[643]: [2024-07-04 06:25:18] [CSCore - PvCSCoreLogger] [WARN] CS: WARNING 30: BackLeft: could not queue buffer 0 (UsbCameraImpl.cpp:724)
I went over and played with the wire. The camera fully disconnected but it ended up "reconnecting"
When the camera was "reconnected" photonvision detected a "new camera" except this time with no otherpaths (aka no usb path, or by id path).
That resulted in pv creating a new camera configuration for a camera with no otherpaths
Cscore then started to report errors that look like it attempted to connect to the same camera twice
This fixes it by filtering out USB cameras that have no otherpath on linux.