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
260 stars 169 forks source link

Cameras are in Driver Mode on boot on OrangePi 5. #1285

Closed crschardt closed 3 months ago

crschardt commented 4 months ago

Describe the bug Frequently, all of the cameras will be set to DriverMode when photonvision starts. This has been observed on the OrangePi 5.

To Reproduce

  1. Install the 2024.2.10 on and OrangePi 5
  2. Start photonvision and configure a camera with a pipeline
  3. Shut down the OrangePi 5 by pulling the power
  4. Restart and check the camera pipeline
  5. You may have to repeat a few times to trigger this bug

Platform:

Root Cause Investigation: I ran the VSCode remote debugger on photonvision and found that there are two threads that are activated when the pipeline changes. To the best of my understanding, here's what is happening: 1) VisionRunner Thread:

If the camera configuration is saved by ConfigManager before the VisionRunner thread is able to update the pipeline, then it saves the old values rather than the updated value for the pipeline. It also causes the database to be out of sync with the current pipeline and UI.

srimanachanta commented 4 months ago

Ditto on this problem

mcm001 commented 4 months ago

Does this fix it? https://github.com/PhotonVision/photonvision/pull/1286

crschardt commented 4 months ago

It looks promising. I've rebooted several times without any pipeline problems. I'll continue to test.

mcm001 commented 3 months ago

Closing as addressed