Welcome to DOFBOT Pro repository
1. Dabai_DCW2 camera
Dabai_DCW2 Camera
Before starting this function, you need to close the large program and APP processes. If you need to restart the large program and APP later, start them from the terminal:
bash ~/dofbot_pro/APP_DOFBOT_PRO/start_app.sh1. Function Description
After starting the camera, you can obtain RGB color images, Depth images, and IR infrared images.
2. Startup and Operation
2.1. Startup
After connecting the camera to the main board via data cable, open the terminal and enter:
xxxxxxxxxxros2 launch orbbec_camera dabai_dcw2.launch.py
As shown in the figure below, if the terminal prints the above content, it means the camera is running normally and started successfully. You can use the following command to view the topics published by the camera node. Enter in the terminal:

xxxxxxxxxxros2 node info /camera/camera
As shown in the figure below, the published color image topic is /camera/color/image_raw, the published depth image topic is /camera/depth/image_raw, the published infrared image topic is /camera/ir/image_raw, and the published point cloud data topic is /camera/depth/points.

2.2. Operation
Use rviz to view the three images and point cloud provided by the camera. Restart a terminal and enter:
xxxxxxxxxxrviz2
After rviz starts, configure rviz according to the following diagram:

Change [Fixed Frame] here to camera_link
Add color image display

Click [Add], then click [By topic], select [/color/image_raw/Image], and finally click [ok] to confirm. The resulting color image is as follows:

Add depth image display

Click [Add], then click [By topic], select [/depth/image_raw/Image], and finally click [ok] to confirm. The resulting depth color image is as follows:

Add infrared image display

Click [Add], then click [By topic], select [/ir/image_raw/Image], and finally click [ok] to confirm. The resulting infrared image is as follows:

View depth point cloud data

Click [Add], then click [By topic], select [/depth/points/PointCloud2], and finally click [ok] to confirm. The resulting depth point cloud image is as follows:

View color point cloud data

Click [Add], then click [By topic], select [/depth_registered/points/PointCloud2], and finally click [ok] to confirm. The resulting color point cloud image is as follows:

3. Camera Parameters
3.1. Hardware Parameter Table

3.2. Camera Parameter Acquisition and Settings
The camera's initialization parameters have been set in the launched launch file. The launch file path is:
xxxxxxxxxx/home/jetson/dofbot_pro_ws/src/OrbbecSDK_ROS2-main/orbbec_camera/launch/dabai_dcw2.launch.pyThe content inside is as follows:
xfrom launch import LaunchDescriptionfrom launch.actions import DeclareLaunchArgumentfrom launch.substitutions import LaunchConfigurationfrom launch_ros.actions import PushRosNamespacefrom launch.actions import GroupActionfrom launch_ros.actions import ComposableNodeContainerfrom launch_ros.descriptions import ComposableNodefrom launch_ros.actions import Nodeimport osdef generate_launch_description(): # Declare arguments args = [ DeclareLaunchArgument('camera_name', default_value='camera'), DeclareLaunchArgument('depth_registration', default_value='true'), DeclareLaunchArgument('serial_number', default_value=''), DeclareLaunchArgument('usb_port', default_value=''), DeclareLaunchArgument('device_num', default_value='1'), DeclareLaunchArgument('vendor_id', default_value='0x2bc5'), DeclareLaunchArgument('product_id', default_value=''), DeclareLaunchArgument('enable_point_cloud', default_value='true'), DeclareLaunchArgument('enable_colored_point_cloud', default_value='true'), DeclareLaunchArgument('cloud_frame_id', default_value=''), DeclareLaunchArgument('point_cloud_qos', default_value='default'), DeclareLaunchArgument('connection_delay', default_value='100'), DeclareLaunchArgument('color_width', default_value='640'), DeclareLaunchArgument('color_height', default_value='480'), DeclareLaunchArgument('color_fps', default_value='30'), DeclareLaunchArgument('color_format', default_value='MJPG'), DeclareLaunchArgument('enable_color', default_value='true'), DeclareLaunchArgument('flip_color', default_value='false'), DeclareLaunchArgument('color_qos', default_value='default'), DeclareLaunchArgument('color_camera_info_qos', default_value='default'), DeclareLaunchArgument('enable_color_auto_exposure', default_value='true'), DeclareLaunchArgument('color_exposure', default_value='-1'), DeclareLaunchArgument('color_gain', default_value='-1'), DeclareLaunchArgument('enable_color_auto_white_balance', default_value='true'), DeclareLaunchArgument('color_white_balance', default_value='-1'), DeclareLaunchArgument('color_ae_max_exposure', default_value='-1'), DeclareLaunchArgument('color_brightness', default_value='-1'), DeclareLaunchArgument('color_sharpness', default_value='-1'), DeclareLaunchArgument('color_saturation', default_value='-1'), DeclareLaunchArgument('color_contrast', default_value='-1'), DeclareLaunchArgument('color_gamma', default_value='-1'), DeclareLaunchArgument('color_hue', default_value='-1'), DeclareLaunchArgument('depth_width', default_value='640'), DeclareLaunchArgument('depth_height', default_value='400'), DeclareLaunchArgument('depth_fps', default_value='15'), DeclareLaunchArgument('depth_format', default_value='Y11'), DeclareLaunchArgument('enable_depth', default_value='true'), DeclareLaunchArgument('flip_depth', default_value='false'), DeclareLaunchArgument('depth_qos', default_value='default'), DeclareLaunchArgument('depth_camera_info_qos', default_value='default'), # /config/depthfilter/Openni_device.json,need config path. DeclareLaunchArgument('depth_filter_config', default_value=''), DeclareLaunchArgument('ir_width', default_value='640'), DeclareLaunchArgument('ir_height', default_value='400'), DeclareLaunchArgument('ir_fps', default_value='15'), DeclareLaunchArgument('ir_format', default_value='Y10'), DeclareLaunchArgument('enable_ir', default_value='true'), DeclareLaunchArgument('flip_ir', default_value='false'), DeclareLaunchArgument('ir_qos', default_value='default'), DeclareLaunchArgument('ir_camera_info_qos', default_value='default'), DeclareLaunchArgument('enable_ir_auto_exposure', default_value='true'), DeclareLaunchArgument('ir_exposure', default_value='-1'), DeclareLaunchArgument('ir_gain', default_value='-1'), DeclareLaunchArgument('publish_tf', default_value='true'), DeclareLaunchArgument('tf_publish_rate', default_value='0.0'), DeclareLaunchArgument('ir_info_url', default_value=''), DeclareLaunchArgument('color_info_url', default_value=''), DeclareLaunchArgument('log_level', default_value='none'), DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'), DeclareLaunchArgument('enable_soft_filter', default_value='true'), DeclareLaunchArgument('enable_ldp', default_value='true'), DeclareLaunchArgument('soft_filter_max_diff', default_value='-1'), DeclareLaunchArgument('soft_filter_speckle_size', default_value='-1'), DeclareLaunchArgument('ordered_pc', default_value='false'), DeclareLaunchArgument('use_hardware_time', default_value='false'), DeclareLaunchArgument('enable_depth_scale', default_value='true'), DeclareLaunchArgument('align_mode', default_value='HW'), DeclareLaunchArgument('laser_energy_level', default_value='-1'), DeclareLaunchArgument('enable_heartbeat', default_value='false'), ] # Node configuration parameters = [{arg.name: LaunchConfiguration(arg.name)} for arg in args] # get ROS_DISTRO ros_distro = os.environ["ROS_DISTRO"] if ros_distro == "foxy": return LaunchDescription( args + [ Node( package="orbbec_camera", executable="orbbec_camera_node", name="ob_camera_node", namespace=LaunchConfiguration("camera_name"), parameters=parameters, output="screen", ) ] ) # Define the ComposableNode else: # Define the ComposableNode compose_node = ComposableNode( package="orbbec_camera", plugin="orbbec_camera::OBCameraNodeDriver", name=LaunchConfiguration("camera_name"), namespace="", parameters=parameters, ) # Define the ComposableNodeContainer container = ComposableNodeContainer( name="camera_container", namespace="", package="rclcpp_components", executable="component_container", composable_node_descriptions=[ compose_node, ], output="screen", ) # Launch description ld = LaunchDescription( args + [ GroupAction( [PushRosNamespace(LaunchConfiguration("camera_name")), container] ) ] ) return ldAfter the camera runs, we can use some services to get or set some parameters, such as getting the exposure value and setting the exposure value. First, let's check what services the camera node can call. Enter in the terminal:
xxxxxxxxxxros2 node info /camera/cameraAs shown in the figure below, these are some services provided after the camera node starts:

3.2.1. Camera Parameter Acquisition
Taking getting the exposure value as an example, call the service. Enter in the terminal:
xxxxxxxxxxros2 service call /camera/get_color_exposure orbbec_camera_msgs/srv/GetInt32 '{}'As shown in the figure below, the obtained exposure value is 100

3.2.2. Camera Parameter Settings
Taking the auto exposure value switch as an example, call the service. Enter in the terminal:
xxxxxxxxxxros2 service call /camera/set_color_auto_exposure std_srvs/srv/SetBool '{data: true}'
Manual setting
xxxxxxxxxxros2 service call /camera/set_color_exposure orbbec_camera_msgs/srv/SetInt32 '{data: 50}'

After setting the auto exposure value, the color image will change the exposure value according to the set environment changes.
