Skip to content

Commit

Permalink
Dynamic reconfigure of SR300 exposure controls
Browse files Browse the repository at this point in the history
  • Loading branch information
James Sergeant committed Mar 8, 2017
1 parent 06524a9 commit a43218d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions realsense_camera/cfg/sr300_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ gen.add("color_white_balance", int_t, 0, "White Bala

gen.add("color_enable_auto_white_balance", int_t, 0, "Enable Auto White Balance", 1, 0, 1)

# Must be set only if color_enable_auto_exposure is disabled
gen.add("color_exposure", int_t, 0, "Exposure", 156, 39, 10000)

gen.add("color_enable_auto_exposure", int_t, 0, "Enable Auto Exposure", 1, 0, 1)

# Options common with F200
gen.add("f200_laser_power", int_t, 0, "Laser Power", 16, 0, 16)
gen.add("f200_accuracy", int_t, 0, "Accuracy", 1, 1, 3)
Expand Down
6 changes: 6 additions & 0 deletions realsense_camera/src/sr300_nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ namespace realsense_camera
rs_set_device_option(rs_device_, RS_OPTION_COLOR_HUE, config.color_hue, 0);
rs_set_device_option(rs_device_, RS_OPTION_COLOR_SATURATION, config.color_saturation, 0);
rs_set_device_option(rs_device_, RS_OPTION_COLOR_SHARPNESS, config.color_sharpness, 0);
rs_set_device_option(rs_device_, RS_OPTION_COLOR_ENABLE_AUTO_EXPOSURE,
config.color_enable_auto_exposure, 0);
if (config.color_enable_auto_exposure == 0)
{
rs_set_device_option(rs_device_, RS_OPTION_COLOR_EXPOSURE, config.color_exposure, 0);
}
rs_set_device_option(rs_device_, RS_OPTION_COLOR_ENABLE_AUTO_WHITE_BALANCE,
config.color_enable_auto_white_balance, 0);
if (config.color_enable_auto_white_balance == 0)
Expand Down

0 comments on commit a43218d

Please sign in to comment.