4.2. All available services for camera control
The service names intuitively reflect their purposes. It’s crucial to understand that services related to setting or getting parameters—denoted as set_* and get_*—become available only when the respective enable_* parameters are activated. For instance, enabling features such as left infrared (IR) with enable_left_ir, right IR with enable_right_ir, depth sensing with enable_depth, or color processing with enable_color (refer to Launch Parameters) is a prerequisite for their corresponding services to be operational. This configuration ensures that services are accessible only when their specific stream is enabled in the launch file’s stream argument.
4.2.1. Color Stream
/camera/get_color_camera_info
rosservice call /camera/get_color_camera_info
/camera/get_color_exposure
rosservice call /camera/get_color_exposure
/camera/get_color_gain
rosservice call /camera/get_color_gain
/camera/set_color_auto_exposure
rosservice call /camera/set_color_auto_exposure 1
/camera/get_color_auto_exposure
rosservice call /camera/get_color_auto_exposure
/camera/set_color_exposure
rosservice call /camera/set_color_exposure 100
/camera/reset_color_exposure
rosservice call /camera/reset_color_exposure
/camera/set_color_gain
rosservice call /camera/set_color_gain 16
/camera/reset_color_gain
rosservice call /camera/reset_color_gain
/camera/set_color_ae_roi
# In data_param, the first value is the Left setting, the second value is the Right setting, the third value is the Top setting, and the fourth value is the Bottom setting.
rosservice call /camera/set_color_ae_roi '{data_param:[0,1279,0,719]}'
/camera/set_color_mirror
rosservice call /camera/set_color_mirror 1
/camera/toggle_color
rosservice call /camera/toggle_color 1
4.2.2. Depth Stream
/camera/get_depth_camera_info
rosservice call /camera/get_depth_camera_info
/camera/get_depth_exposure
rosservice call /camera/get_depth_exposure
/camera/reset_depth_exposure
rosservice call /camera/reset_depth_exposure
/camera/get_depth_gain
rosservice call /camera/get_depth_gain
/camera/reset_depth_gain
rosservice call /camera/reset_depth_gain
/camera/set_depth_auto_exposure
rosservice call /camera/set_depth_auto_exposure 1
/camera/get_depth_auto_exposure
rosservice call /camera/get_depth_auto_exposure
/camera/set_depth_exposure
rosservice call /camera/set_depth_exposure 3000
/camera/set_depth_gain
# v2 version is not supported yet
rosservice call /camera/set_depth_gain 64
/camera/set_depth_ae_roi
# In data_param, the first value is the Left setting, the second value is the Right setting, the third value is the Top setting, and the fourth value is the Bottom setting.
rosservice call /camera/set_depth_ae_roi '{data_param:[0,1279,0,719]}'
/camera/set_depth_mirror
rosservice call /camera/set_depth_mirror 1
/camera/toggle_depth
rosservice call /camera/toggle_depth 1
4.2.3. IR Stream
/camera/get_ir_camera_info
rosservice call /camera/get_ir_camera_info
/camera/get_ir_exposure
rosservice call /camera/get_ir_exposure
/camera/reset_ir_exposure
rosservice call /camera/reset_ir_exposure
/camera/get_ir_gain
rosservice call /camera/get_ir_gain
/camera/reset_ir_gain
rosservice call /camera/reset_ir_gain
/camera/set_ir_auto_exposure
rosservice call /camera/set_ir_auto_exposure 1
/camera/set_ir_exposure
rosservice call /camera/set_ir_exposure 3000
/camera/set_ir_gain
rosservice call /camera/set_ir_gain 64
/camera/set_ir_mirror
rosservice call /camera/set_ir_mirror 1
/camera/switch_ir
rosservice call /camera/switch_ir left
/camera/toggle_ir
rosservice call /camera/toggle_ir 1
4.2.4. Sensor & Emitter Control
/camera/get_auto_white_balance
rosservice call /camera/get_auto_white_balance
/camera/set_auto_white_balance
rosservice call /camera/set_auto_white_balance 1
/camera/get_white_balance
rosservice call /camera/get_white_balance
/camera/reset_white_balance
rosservice call /camera/reset_white_balance
/camera/set_laser
rosservice call /camera/set_laser 1
/camera/set_ldp
rosservice call /camera/set_ldp 1
/camera/get_ldp_status
rosservice call /camera/get_ldp_status
/camera/get_lrm_measure_distance
rosservice call /camera/get_lrm_measure_distance
/camera/set_flood
rosservice call /camera/set_flood 1
/camera/set_fan_work_mode
rosservice call /camera/set_fan_work_mode 1
4.2.5. Device Information & Management
/camera/get_device_info
rosservice call /camera/get_device_info
/camera/get_device_type
rosservice call /camera/get_device_type
/camera/get_serial
rosservice call /camera/get_serial
/camera/get_sdk_version
rosservice call /camera/get_sdk_version
/camera/get_camera_params
rosservice call /camera/get_camera_params
/camera/reboot_device
rosservice call /camera/reboot_device
4.2.6. Synchronization
/camera/get_ptp_config
rosservice call /camera/get_ptp_config
/camera/set_ptp_config
rosservice call /camera/set_ptp_config true
4.2.7. Depth Filter Configuration
/camera/set_filter
# filter_name is the filter name, filter_enable is whether to enable the filter switch, and filter_param is the filter parameter
# Set DecimationFilter
rosservice call /camera/set_filter '{filter_name: DecimationFilter, filter_enable: false, filter_param: [5]}'
# Set SpatialAdvancedFilter
rosservice call /camera/set_filter '{filter_name: SpatialAdvancedFilter, filter_enable: true, filter_param: [0.5,160,1,8]}'
# Set SequenceIdFilter
rosservice call /camera/set_filter '{filter_name: SequenceIdFilter, filter_enable: true, filter_param: [1]}'
# Set ThresholdFilter
rosservice call /camera/set_filter '{filter_name: ThresholdFilter, filter_enable: true, filter_param: [0,15999]}'
# Set NoiseRemovalFilter
rosservice call /camera/set_filter '{filter_name: NoiseRemovalFilter, filter_enable: true, filter_param: [256,80]}'
# Set HardwareNoiseRemoval
rosservice call /camera/set_filter '{filter_name: HardwareNoiseRemoval, filter_enable: true, filter_param: []}'
# Set SpatialFastFilter: [radius]
rosservice call /camera/set_filter '{filter_name: SpatialFastFilter, filter_enable: true, filter_param: [4]}'
# Set SpatialModerateFilter: [disp_diff, magnitude, radius]
rosservice call /camera/set_filter '{filter_name: SpatialModerateFilter, filter_enable: true, filter_param: [160,1,3]}'
4.2.8. Data Capture & Calibration Management
/camera/get_color_camera_info
rosservice call /camera/get_color_camera_info
/camera/get_depth_camera_info
rosservice call /camera/get_depth_camera_info
/camera/get_ir_camera_info
rosservice call /camera/get_ir_camera_info
/camera/save_images
rosservice call /camera/save_images
/camera/save_point_cloud
rosservice call /camera/save_point_cloud