-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Get gain control returns a null pointer for a switchable camera #764
Comments
It looks like switchable cameras are not currently set up to support controls besides focus and exposure. From @Override protected void constructControls()
{
delegatingCameraControls.add(new SwitchableFocusControl(this));
delegatingCameraControls.add(new SwitchableExposureControl(this));
} |
We are seeing multiple related issues while utilizing 3 Logitech 270s:
|
The MultiPortal feature of the FTC VisionPortal does handle three portals normally. To verify this, I started with the two-portal sample OpMode described here, and simply added a third instance of key variables and methods. Here's the RC LiveView, courtesy of And here is the corresponding DS telemetry (merged three screenshots to list it all): To help manage resources, this sample uses the compressed MJPEG format and a lower webcam resolution of 320x240. The sample ran well, without needing to disable any streams (gamepad toggles in this OpMode). The sample continued to run well, even after allowing the default 640x480 resolutions. The above images use 640x480, thus giving usable pose results (for the 2 calibrated webcams). Naturally a competition scenario might require tighter controls including stream toggling. Camera controls, including gain and exposure, should be available on each portal. Note the calibration warning (red text), as one of the webcams was a Logitech QuickCam Pro 5000 for which the FTC SDK does not provide lens intrinsics. The other two webcams were Logitech C270 and Logitech C920. One was plugged into the Control Hub's USB 2.0 port, and the other 2 shared a powered USB hub in the 3.0 port. The FTC Blocks code is posted here, with image below (expand in new browser tab): Java users can study the Blocks code, and easily follow along in OnBot Java or Android Studio. ============ All of this is not intended to diminish the valid points here about gain and exposure control under |
The following code caused a NullPointerException because gainControl was null, so I had to add code to test for null before using it.
The text was updated successfully, but these errors were encountered: