Sounds good, thanks.
The frozen UI I’ve seen from more than one root cause. One has been the browser itself - some PC/browser combos were not happy about having a full 1920x1080 mjpg stream thrown at them, and bog down to the point where they stop rendering.
There’s at least one stack trace in there I know I could go dig into:
[2022-01-13 22:54:15] [VisionModule - VisionModuleChangeSubscriber - mmal_service_16.1] [ERROR] Failed to invoke camera settable method: setVideoModeIndex
[2022-01-13 22:54:15] [VisionModule - VisionModuleChangeSubscriber - mmal_service_16.1] [ERROR] java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.photonvision.vision.processes.VisionModuleChangeSubscriber.onDataChangeEvent(VisionModuleChangeSubscriber.java:170)
at org.photonvision.common.dataflow.DataChangeService.dispatchFromQueue(DataChangeService.java:64)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at org.photonvision.vision.camera.ZeroCopyPicamSource$PicamSettables.setVideoModeInternal(ZeroCopyPicamSource.java:168)
at org.photonvision.vision.processes.VisionSourceSettables.setVideoMode(VisionSourceSettables.java:58)
at org.photonvision.vision.processes.VisionSourceSettables.setVideoModeIndex(VisionSourceSettables.java:75)
... 7 more
[2022-01-13 22:54:17] [General - ConfigManager] [DEBUG] Saving to disk...
[2022-01-13 22:54:17] [General - ConfigManager] [INFO] Settings saved!
[2022-01-13 22:55:02] [General - ConfigManager] [DEBUG] Saving to disk...
[2022-01-13 22:55:02] [General - ConfigManager] [INFO] Settings saved!
[2022-01-13 22:55:15] [General - ConfigManager] [DEBUG] Saving to disk...
[2022-01-13 22:55:15] [General - ConfigManager] [INFO] Settings saved!
[2022-01-13 22:55:44] [VisionModule - VisionModuleChangeSubscriber - mmal_service_16.1] [ERROR] Failed to invoke camera settable method: setVideoModeIndex
[2022-01-13 22:55:44] [VisionModule - VisionModuleChangeSubscriber - mmal_service_16.1] [ERROR] java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.photonvision.vision.processes.VisionModuleChangeSubscriber.onDataChangeEvent(VisionModuleChangeSubscriber.java:170)
at org.photonvision.common.dataflow.DataChangeService.dispatchFromQueue(DataChangeService.java:64)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at org.photonvision.vision.camera.ZeroCopyPicamSource$PicamSettables.setVideoModeInternal(ZeroCopyPicamSource.java:168)
at org.photonvision.vision.processes.VisionSourceSettables.setVideoMode(VisionSourceSettables.java:58)
at org.photonvision.vision.processes.VisionSourceSettables.setVideoModeIndex(VisionSourceSettables.java:75)
... 7 more
Additionally, I do have the symptom replicated on my end.
1920x1080 - framerate is slow enough for reasonable illumination -
320*240 - framerate too high to keep the shutter open long enough to get good illumination.
There’s two related issues that I think you’re being hit by:
- The gain slider probably needs to be split into two - right now it controls both red/blue balance simultaneously, and it’s been reported from multiple folks it’s hard to get a good non-retro-reflective image of a ball.
- The framerate needs to be cappable so the shutter time can be increased and let more light into the camera.
FWIW most of us have been testing with picam v1.3’s - not to say for sure you should switch, but just be aware of some of the image binning implications of the v2