PerkLab / MCSTrack

Multi-camera spatial tracking
MIT License
0 stars 4 forks source link

Detectors now inform controller which parameters can be changed, and their ranges #63

Closed vaughantnrc closed 2 months ago

vaughantnrc commented 2 months ago

UI is generated dynamically based on KeyValue data structures. See screenshot below for an example of what is generated.

RPi5CaptureSettings

keiranbarr commented 2 months ago

Works well with the Pi camera detectors as well as openCV webcam when running GUI in VSCode. Code looks fine to me also.

I get a bizarre bug however when running the GUI through bash. In this setup, if 0 < ExposureTime < 22000, the detector panel hangs. What is weirder though, is that physically closing the aperture of the camera causes the detector panel to hang after a certain threshold of closed-ness is reached. However, the GUI goes back to normal if the aperture is either fully closed, or opened back up. I cannot recreate this with the GUI running through VSCode.

One thing I noticed when running the GUI through bash or VSCode -- the GUI returns a "Failed to find resolution of DetectorConnection..." error when connecting to the Pi camera detector. The error does not occur when using an OpenCV webcam.

vaughantnrc commented 2 months ago

One thing I noticed when running the GUI through bash or VSCode -- the GUI returns a "Failed to find resolution of DetectorConnection..." error when connecting to the Pi camera detector. The error does not occur when using an OpenCV webcam.

This is likely related to the old separation of components. Calibrator used to be separate from Detector, so we would have to ask the detector for the current resolution, then ask the calibrator for the list of calibrations matching that resolution, determine which one is the most recent, then send that to the pose solver. Now that the calibrator's functionality has been merged into the detector, we can cut out a large part of those setup communications. I'll probably do that part next so we can tidy this part of the code up (and related errors/warnings).

vaughantnrc commented 2 months ago

I get a bizarre bug however when running the GUI through bash. In this setup, if 0 < ExposureTime < 22000, the detector panel hangs. What is weirder though, is that physically closing the aperture of the camera causes the detector panel to hang after a certain threshold of closed-ness is reached. However, the GUI goes back to normal if the aperture is either fully closed, or opened back up. I cannot recreate this with the GUI running through VSCode.

This is very strange - I'll try to reproduce this. But we already know that running the GUI on the Raspberry Pi 5 results in strange behaviour. It might make sense to do GUI testing on other computers.

vaughantnrc commented 2 months ago

I'll try to reproduce this. But we already know that running the GUI on the Raspberry Pi 5 results in strange behaviour

I do not have this problem on other Linux. The UI does get slow though if I make the window larger.