Skip to content

Commit

Permalink
Merge pull request IntelRealSense#27 from otcshare/RAR-267-dynamicall…
Browse files Browse the repository at this point in the history
…y-enable-disable-streams

Rar 267 dynamically enable disable streams
  • Loading branch information
rjingar committed Mar 16, 2016
2 parents 989eead + 233190f commit cb98974
Show file tree
Hide file tree
Showing 5 changed files with 267 additions and 128 deletions.
7 changes: 6 additions & 1 deletion camera/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Infrared2 camera
depth_fps (int, default: 60)
Specify the depth camera FPS
enable_depth (bool, default: true)
Specify if to enable or not the depth camera.
Specify if to enable or not the depth and infrared camera.
enable_color (bool, default: true)
Specify if to enable or not the color camera.
enable_pointcloud (bool, default: true)
Expand Down Expand Up @@ -141,6 +141,11 @@ To get supported camera options with current value set. It returns string in opt
R200_AUTO_EXPOSURE_LEFT_EDGE
R200_AUTO_EXPOSURE_RIGHT_EDGE

Enable/Disable Stream:
ENABLE_DEPTH
Check or uncheck the option to disable/enable depth and infrared streams dynamically.
Note: Infrared streams will be enabled or disabled along with depth stream.

Use rqt_reconfigure GUI to view and edit the parameters that are accessible via dynamic_reconfigure.

Command to launch GUI:
Expand Down
39 changes: 20 additions & 19 deletions camera/cfg/camera_params.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()

# Name Type Level Description Default Min Max
gen.add("COLOR_BACKLIGHT_COMPENSATION", int_t, 0, "Backlight Compensation", 1, 0, 4)
gen.add("COLOR_BRIGHTNESS", int_t, 0, "Brightness", 56, 0, 255)
gen.add("COLOR_CONTRAST", int_t, 0, "Contrast", 32, 16, 64)
gen.add("COLOR_GAIN", int_t, 0, "Gain", 32, 0, 256)
gen.add("COLOR_GAMMA", int_t, 0, "Gamma", 220, 100, 280)
gen.add("COLOR_HUE", int_t, 0, "Hue", 0, -2200, 2200)
gen.add("COLOR_SATURATION", int_t, 0, "Saturation", 128, 0, 255)
gen.add("COLOR_SHARPNESS", int_t, 0, "Sharpness", 0, 0, 7)
gen.add("COLOR_WHITE_BALANCE", int_t, 0, "White Balance", 6500, 2000, 8000)
gen.add("COLOR_ENABLE_AUTO_WHITE_BALANCE", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("R200_LR_AUTO_EXPOSURE_ENABLED", int_t, 0, "LR Auto Exposure Enabled", 0, 0, 1)
gen.add("R200_LR_GAIN", int_t, 0, "LR Gain", 400, 100, 6399)
gen.add("R200_LR_EXPOSURE", int_t, 0, "LR Exposure", 164, 1, 164)
gen.add("R200_EMITTER_ENABLED", int_t, 0, "Emitter Enabled", 1, 0, 1)
gen.add("R200_DISPARITY_MULTIPLIER", int_t, 0, "Disparity Multiplier", 32, 1, 1000)
gen.add("R200_AUTO_EXPOSURE_TOP_EDGE", int_t, 0, "Auto Exposure Top Edge", 0, 0, 479)
gen.add("R200_AUTO_EXPOSURE_BOTTOM_EDGE", int_t, 0, "Auto Exposure Bottom Edge", 479, 0, 479)
gen.add("R200_AUTO_EXPOSURE_LEFT_EDGE", int_t, 0, "Auto Exposure Left Edge", 0, 0, 639)
gen.add("R200_AUTO_EXPOSURE_RIGHT_EDGE", int_t, 0, "Auto Exposure Right Edge", 639, 0, 639)
gen.add("ENABLE_DEPTH", bool_t, 0, "Enable Depth", True)
gen.add("COLOR_BACKLIGHT_COMPENSATION", int_t, 0, "Backlight Compensation", 1, 0, 4)
gen.add("COLOR_BRIGHTNESS", int_t, 0, "Brightness", 56, 0, 255)
gen.add("COLOR_CONTRAST", int_t, 0, "Contrast", 32, 16, 64)
gen.add("COLOR_GAIN", int_t, 0, "Gain", 32, 0, 256)
gen.add("COLOR_GAMMA", int_t, 0, "Gamma", 220, 100, 280)
gen.add("COLOR_HUE", int_t, 0, "Hue", 0, -2200, 2200)
gen.add("COLOR_SATURATION", int_t, 0, "Saturation", 128, 0, 255)
gen.add("COLOR_SHARPNESS", int_t, 0, "Sharpness", 0, 0, 7)
gen.add("COLOR_WHITE_BALANCE", int_t, 0, "White Balance", 6500, 2000, 8000)
gen.add("COLOR_ENABLE_AUTO_WHITE_BALANCE", int_t, 0, "Enable Auto White Balance", 1, 0, 1)
gen.add("R200_LR_AUTO_EXPOSURE_ENABLED", int_t, 0, "LR Auto Exposure Enabled", 0, 0, 1)
gen.add("R200_LR_GAIN", int_t, 0, "LR Gain", 400, 100, 6399)
gen.add("R200_LR_EXPOSURE", int_t, 0, "LR Exposure", 164, 1, 164)
gen.add("R200_EMITTER_ENABLED", int_t, 0, "Emitter Enabled", 1, 0, 1)
gen.add("R200_DISPARITY_MULTIPLIER", int_t, 0, "Disparity Multiplier", 32, 1, 1000)
gen.add("R200_AUTO_EXPOSURE_TOP_EDGE", int_t, 0, "Auto Exposure Top Edge", 0, 0, 479)
gen.add("R200_AUTO_EXPOSURE_BOTTOM_EDGE", int_t, 0, "Auto Exposure Bottom Edge", 479, 0, 479)
gen.add("R200_AUTO_EXPOSURE_LEFT_EDGE", int_t, 0, "Auto Exposure Left Edge", 0, 0, 639)
gen.add("R200_AUTO_EXPOSURE_RIGHT_EDGE", int_t, 0, "Auto Exposure Right Edge", 639, 0, 639)

exit(gen.generate(PACKAGE, "realsense_camera", "camera_params"))
Loading

0 comments on commit cb98974

Please sign in to comment.