PhotonVision / photonvision

PhotonVision is the free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition.
https://photonvision.org
GNU General Public License v3.0
264 stars 180 forks source link

USB Camera Streams Switched at Boot (Opi5, AC OV9281 USB) #1234

Closed Roman-Tech-Plus closed 6 months ago

Roman-Tech-Plus commented 6 months ago

Description When running two simultaneous USB camera apriltag streams off the same orange pi5, the given camera names appear to be randomly resigned at coprocessor boot or camera reconnection This manifested for us as our two USB Arducam OV9281 cameras running off of one OPi5, having their respective identities of "frontcam" and "backcam" randomly reassigned to each other each boot cycle (sometimes no change woud occur). This resulted in code meant to reference the camera mounted to the back of our robot, referencing the one to its front instead. Additionally, the reassignment appears to extend to camera settings, such as its 3d calibration data and AT pipeline settings getting used on the wrong camera.

To Reproduce Steps to reproduce the behavior:

  1. Set up an Opi5 based PV image system with two identical Arducam OV9281 USB cameras 2.Set up both cameras as Apriltag pipelines (one of ours was 3d, the other 2d)
  2. Give each camera a unique name 4.Power cycle system, it may take more than one try for issue to manifest, as it is random, as previously stated.

Platform:

mcm001 commented 6 months ago

Can you post journalctl logs here? Ideally from a subset of time when you know the cameras didn't move physically but was reassigned.

if you rename the cameras using the arducam renamer, does this still happen?

Roman-Tech-Plus commented 6 months ago

That seems to have worked, we're running more tests to verify.