-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Unable to control exposure of the color camera #19
Comments
Hmm. We already have an inline comment for this as well https://github.com/IntelRealSense/librealsense/blob/master/src/uvc-v4l2.cpp#L459 It works for F200, R200, and SR300 on our Windows backend, so we'll look into it more deeply. |
I'll also give it a try on my Arch laptop this weekend and let you know about the results. |
Confirming this works fine on Windows but throws an error on Ubuntu 14.04. |
UVC controls across the backends have slightly inconsistent interfaces when it comes to exposure. There is some additional logic that will need to be added to the V4L2 backend. Just noting here that we acknowledge color exposure is broken on Linux but at the moment it's lower priority to fix. |
I aslo can not set this option in Windows10,but I can get it,I used: |
I confirm this happens on 14.04 when using the Realsense ROS package and setting R200_LR_AUTO_EXPOSURE_ENABLED to 1. That makes the IR and depth images stall until I reconnect the device. What's also interesting: the cpp-enumerate-devices example shows the following:
Which I understand as the color auto exposure having range 0-0. That's strange. |
Release 1.0.2
As I noted before, it is possible to toggle auto exposure and adjust exposure time using So this patch fixes the issue for me: diff --git a/src/uvc-v4l2.cpp b/src/uvc-v4l2.cpp
index 9c1b01b..05a94f5 100644
--- a/src/uvc-v4l2.cpp
+++ b/src/uvc-v4l2.cpp
@@ -462,14 +462,14 @@ namespace rsimpl
case RS_OPTION_COLOR_BACKLIGHT_COMPENSATION: return V4L2_CID_BACKLIGHT_COMPENSATION;
case RS_OPTION_COLOR_BRIGHTNESS: return V4L2_CID_BRIGHTNESS;
case RS_OPTION_COLOR_CONTRAST: return V4L2_CID_CONTRAST;
- case RS_OPTION_COLOR_EXPOSURE: return V4L2_CID_EXPOSURE; // Is this actually valid? I'm getting a lot of VIDIOC error 22s...
+ case RS_OPTION_COLOR_EXPOSURE: return V4L2_CID_EXPOSURE_ABSOLUTE;
case RS_OPTION_COLOR_GAIN: return V4L2_CID_GAIN;
case RS_OPTION_COLOR_GAMMA: return V4L2_CID_GAMMA;
case RS_OPTION_COLOR_HUE: return V4L2_CID_HUE;
case RS_OPTION_COLOR_SATURATION: return V4L2_CID_SATURATION;
case RS_OPTION_COLOR_SHARPNESS: return V4L2_CID_SHARPNESS;
case RS_OPTION_COLOR_WHITE_BALANCE: return V4L2_CID_WHITE_BALANCE_TEMPERATURE;
- case RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE: return V4L2_CID_AUTOGAIN; // Automatic gain/exposure control
+ case RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE: return V4L2_CID_EXPOSURE_AUTO;
case RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE: return V4L2_CID_AUTO_WHITE_BALANCE;
default: throw std::runtime_error(to_string() << "no v4l2 cid for option " << option);
} Tested with all (R200, F200, SR300) cameras. Note that |
…log-history Add missing Change Log history file
I've been using |
Thank you, this does seem to solve the problem. |
Auto exposure should be functional now on all platforms |
Merge master from librealsense to abernste
…michalpr2 Rtsp client setup and play
Fixed output validity and write_matlab_camera_params_file
I'm having troubles toggling auto exposure and getting/setting exposure time manually.
supports_option()
function works and reports that thers::option::color_enable_auto_exposure
is supported. However, when I try to get or set this option I get the following error:At the same time, I can toggle auto exposure using
v4l2-ctl -d /dev/video1 -c exposure_auto=1
. So it seems to be a problem on the library side.Tried with both R200 and F200. Any suggestions?
The text was updated successfully, but these errors were encountered: