Confusion/issues related to voxl-camera-server...
-
I need to be able to change gain/exposure settings for the hires camera. Referring to the voxl-camera-server page I ran voxl-send-command hires set_exp_gain 200 150. The response comes back as if successful (which really only indicates that it was successfully sent), but when I look at the output of the voxl-camera-server service using journalctl -u voxl-camera-server it says:
Invalid Control Pipe Exposure: 200.000000, Should be between 0.020000 and 0.000000
So I rerun the command to use a setting within those limits (voxl-send-command hires set_exp_gain .015 150), but I still get the same error.
Digging into this a bit more, I click on the link for the voxl-camera-server source code and it is redirected to apq8096-camera-server under voxl-sdk/services.
I see from this post that this voxl-camera-server code is/was recently changing. What code should I be looking at to understand what the problem is here?
-
I now see that the code under voxl-camera-server has the error message "Invalid Control Pipe Exposure:..." commented out, so I must be running (and should be looking at) apq8096-camera-server code. If I rebuild and install on my flight deck, I'll assume that I should just change the name to voxl-camera-server.
Please clarify! -
Looking at the file hal3_camera_mgr.cpp, I believe line 56...
#define MAX_EXP 33
should be changed to
#define MAX_EXP 33.0
That will at least fix the error message.
-
@Alex-Gardner one other thing that may improve efficiency in hal3_camera_mgr.cpp...
It appears that the code around 694-702...
m_currentExposure = m_nextExposure; m_currentGain = m_nextGain; m_nextExposure = -1; m_nextGain = -1; uint8_t aeMode = 0; // Auto exposure is off i.e. the underlying driver does not control exposure/gain m_requestMetadata.update(ANDROID_CONTROL_AE_MODE, &aeMode, 1); m_requestMetadata.update(ANDROID_SENSOR_EXPOSURE_TIME, &(m_currentExposure), 1); m_requestMetadata.update(ANDROID_SENSOR_SENSITIVITY, &(m_currentGain), 1);
is called even when there's no change to exposure and gain. Those lines could probably be wrapped with a test for the change...
if ((m_currentExposure != m_nextExposure) || (m_currentGain != m_nextGain)) { m_currentExposure = m_nextExposure; m_currentGain = m_nextGain; m_nextExposure = -1; m_nextGain = -1; uint8_t aeMode = 0; // Auto exposure is off i.e. the underlying driver does not control exposure/gain m_requestMetadata.update(ANDROID_CONTROL_AE_MODE, &aeMode, 1); m_requestMetadata.update(ANDROID_SENSOR_EXPOSURE_TIME, &(m_currentExposure), 1); m_requestMetadata.update(ANDROID_SENSOR_SENSITIVITY, &(m_currentGain), 1); }
-
Hi,
Thanks for digging into this a bit, in short: camera server went through a major overhaul to make it much cleaner and more robust when we released our qrb5165-based platforms. The release that we're currently testing and plan to release soon for all platforms has this updated camera server backported to voxl1(apq8096) as well.
This rewrite was mostly cleaning up 3-4 year old code while maintaining the same behavior, but there were a few proper improvements, including redoing the state machine for the AE stuff. There's a known bug in the old camera server where the set commands will not work if the selected AE algorithm in the config file is to use the ISP's (default for the hires cam) since the module will ignore those set values. Additionally, in the new camera server we've included proper values for min/max exp/gain for each different sensor, not just the generic definitions of the old one.
At this point we're not planning to make any additions to the apq-specific camera server since all the known issues have been ironed out of the cross-platform one and it'll take longer to test and release backports of the old camera server than it will for us to finish pushing out a full release for APQ with the new camera server (we're targeting the next week and a half or so).
-
@Alex-Gardner Will we be notified when the new version is available?