Closed ghost closed 10 years ago
Thank you wji for reporting this bug.
I've updated the code so that it behaves differently when auto gain is toggled on (where it will ONLY enable auto gain) and when auto gain is toggled off (where it will first disable auto gain, and the change other gain-related settings).
Also, the ROS wrapper will now auto-disable "auto gain" if it detects any changes in the manual gain params, which I presume is the ideal "expected behavior" that you were alluding to :D
12785f501c5dca74527b54d40420bdf289c927a1 4cba05953f335ff68c33d1231ea72298532b035f
Hello,
I've run into a problem when setting the auto_gain parameter using the ueye_cam driver. The relevant function is
UEyeCamDriver::setGain()
.The problem is that the call to
is_SetHardwareGain()
overwrites any changes to the auto_gain parameter. From the UEye manual foris_SetAutoParameter
:Since
is_SetHardwareGain
is called AFTERis_SetAutoParameter
, auto_gain is always disabled right after having been enabled.I've added a patch that prioritises auto_gain over the manual gain settings by moving
is_SetAutoParameter
behindis_SetHardwareGain
function: https://gist.github.com/wji/8595160Consequently, to set a master_gain manually, auto_gain must first be disabled, but I believe that is closer to the expected behaviour than not having auto_gain work at all :).