realsense-ros
realsense-ros copied to clipboard
D435i how to turn auto exposure ON/OFF on launch?
Hello,
I'm unable to find a parameter to turn the auto exposure ON/OFF for the D435i cameras. The only way I can do it now is to run rosrun rqt_reconfigure rqt_reconfigure
and do it through the GUI, but I wish to do this from a script.
Thank you!
Hi @rakshith95 Are you able to set enable_auto_exposure with rosrun without accessing the GUI by using the commands below in the ROS terminal during runtime, please
OFF rosrun dynamic_reconfigure dynparam set /camera/stereo_module enable_auto_exposure 0
ON rosrun dynamic_reconfigure dynparam set /camera/stereo_module enable_auto_exposure 1
This works, thank you! Why isn't this a launch parameter though?
Rosparam code for depth and color auto-exposure enable / disable is below.
OFF
<rosparam>
/camera/rgb_camera/enable_auto_exposure: false
/camera/stereo_module/enable_auto_exposure: false
</rosparam>
ON
<rosparam>
/camera/rgb_camera/enable_auto_exposure: true
/camera/stereo_module/enable_auto_exposure: true
</rosparam>
Thank you! Closing this
@MartyG-RealSense setting the parameters doesn't seem to work for me. The auto exposure is the same status irrespective of setting the parameter to true
or false
The only other way that I know of for setting it in launch instead of rosrun would be to define it in a yaml configuration file and then import the yaml into the launch file, as described at https://github.com/IntelRealSense/realsense-ros/issues/2366#issuecomment-1147104915
hi @rakshith95 Do you require further assistance with this case, please? Thanks!
No, thank you.
Thanks very much @rakshith95 for the update!
@MartyG-RealSense Hi, I am also facing with an auto exposure problem. I found that when I enable the laser emitter, my d435i cannot auto-exposure correctly. I test it with realsense-viewer. When I enable auto-exposure with emitter off, the actual exposure of infrared image can change with the lighting condition. But once I turn on the emitter (when the infrared camera is on), the actual exposure is freezing and will not change with lighting. In addition, when I turn on the camera with auto-exposure on and emitter on, the actual exposure is fixed at the maximal value at current fps (about 31400 us for 30 fps). I hope to confirm is this normal? Thank you!
Hi @chenhanpolyu How the depth auto-exposure should operate when correct is that exposure can update but the exposure value can no longer update until auto-exposure is disabled. Instead, depth auto-exposure should be read from the camera metadata parameter ACTUAL_EXPOSURE whilst depth auto-exposure is enabled.
Take a look on this PR #2612, it mainly for ROS2, but it should be the same solution for ros1 by editing your launch file.