# DepthAI ROS 驱动程序

目前，推荐使用 depthai_ros_driver 包中的可执行文件来启动相机。

这将使相机以 ROS2 组件/ROS1 Nodelet 形式运行，并通过 ROS 参数自定义相机配置。

ROS2 和 ROS1 的主要 API 差异在于参数命名约定不同：ROS2 中使用 . 作为命名空间分隔符，而 ROS1 中使用 _。例如，ROS2 中为 camera.i_pipeline_type，ROS1 中为
camera_i_pipeline_type。为简便起见，本自述文件采用 ROS2 约定。所有可用参数及其默认值的列表可参见自述文件末尾。

以 r_ 开头的参数可以在运行时自由修改，例如使用 rqt。

以 i_ 开头的参数在相机初始化时设置，要更改它们，需调用 stop 和 start 服务。这可用于在运行时热切换神经网络、更改分辨率等。

## 启动文件

我们为 [depthai-ros-driver](https://github.com/luxonis/depthai-ros/tree/humble/depthai_ros_driver) 包提供了一些示例：

 * camera.launch.py 以 RGBD 模式启动相机，并在空间（Mobilenet）模式下加载神经网络。
 * rgbd_pcl.launch.py 以基本 RGBD 配置启动相机，不加载任何神经网络。同时加载用于 RGBD 点云的 ROS 深度处理节点。
 * example_multicam.launch.py 同时启动多个相机，每个相机位于不同的容器中。编辑 config 目录下的 multicam_example.yaml 配置文件以更改参数。
 * example_segmentation.launch.py 以 RGBD + 语义分割模式启动相机（pipeline_type=RGBD, nn_type=rgb）。
 * pointcloud.launch.py - 类似于 rgbd_pcl.launch.py，但不使用 RGB 组件生成点云。
 * example_marker_publish.launch.py 启动 camera.launch.py 以及一个小型 Python 节点，该节点将检测到的对象发布为标记/坐标系变换。
 * rtabmap.launch.py 启动相机和 RTAB-MAP RGBD SLAM（需要先安装：sudo apt install ros-$ROS_DISTRO-rtabmap-ros）。可能需要通过参数设置手动对焦。

启动方式如下：

 * ros2 launch depthai_ros_driver camera.launch.py (ROS2)
 * roslaunch depthai_ros_driver camera.launch (ROS1)

## 基于外参发布坐标系变换

默认情况下，相机变换基于 CAD 模型的默认 URDF 描述发布。可通过使用 depthai_bridge 中的 TFPublisher 类覆盖此行为，该类基于设备的相机校准数据重新发布带有更新信息的描述。要在 depthai_ros_driver
中启用此行为，可使用以下参数：

 * camera.i_publish_tf_from_calibration - 设置为 true 将启动 TFPublisher

然后可设置以下参数：

 * camera.i_tf_camera_name - 如果未设置，默认为节点名称
 * camera.i_tf_camera_model - 如果未设置，将自动检测。如果节点无法检测到相机的 STL 文件，则设置为 OAK-D。若要显式设置，可在 camera.launch.py 中设置 override_cam_model:=true
 * camera.i_tf_base_frame
 * camera.i_tf_parent_frame
 * camera.i_tf_cam_pos_x
 * camera.i_tf_cam_pos_y
 * camera.i_tf_cam_pos_z
 * camera.i_tf_cam_roll
 * camera.i_tf_cam_pitch
 * camera.i_tf_cam_yaw

使用 camera.launch.py 时，可设置 pass_tf_args_as_params:=true，以便将坐标系变换参数用于填充这些参数。例如：ros2 launch depthai_ros_driver camera.launch.py
pass_tf_args_as_params:=true parent_frame:=map cam_pos_x:=1.0 imu_from_descr:=true

还可以通过 camera.i_tf_custom_urdf_path 和 camera.i_tf_custom_xacro_args 设置自定义 URDF 路径（目前仅支持绝对路径）和自定义 xacro 参数。请注意，必须运行
robot_state_publisher。

> **关于外参的说明**
> 如果您的相机 IMU 未经校准，则会显示警告，并且 IMU 将以零旋转和平移发布。 您可以通过设置
> `camera.i_tf_imu_from_descr: true`
> 来覆盖此行为。这将根据相机模型从 URDF 发布默认的 IMU 外参。

## 可用的传感器及其分辨率：

 * IMX378 - {"12MP", "4K", "1080P"}, 默认 1080P
 * OV9282 - {"800P", "720P", "400P"}, 默认 800P
 * OV9782 - {"800P", "720P", "400P"}, 默认 800P
 * OV9281 - {"800P", "720P", "400P"}, 默认 800P
 * IMX214 - {"13MP", "12MP", "4K", "1080P"}, 默认 1080P
 * IMX412 - {"13MP", "12MP", "4K", "1080P"}, 默认 1080P
 * OV7750 - {"480P", "400P"}, 默认 480P
 * OV7251 - {"480P", "400P"}, 默认 480P
 * IMX477 - {"12MP", "4K", "1080P"}, 默认 1080P
 * IMX577 - {"12MP", "4K", "1080P"}, 默认 1080P
 * AR0234 - {"1200P"}, 默认 1200P
 * IMX582 - {"48MP", "12MP", "4K"}, 默认 4K
 * LCM48 - {"48MP", "12MP", "4K"}, 默认 4K

## 设置 RGB 参数

默认情况下，RGB 相机输出 ISP 帧。要设置输出图像的自定义宽度和高度，可以设置 i_isp_num 和 i_isp_den，它们会缩放图像尺寸（默认为 2 和 3，因此从 1920x1080 变为 1280x720），请注意，要使 RGBD
对齐正常工作，结果宽度和高度必须能被 16 整除。

此外，你可以设置 i.output_isp: false 来使用 video 输出，并使用 i_width 和 i_height 参数设置自定义尺寸。

## 设置立体视觉参数

### 深度对齐

当设置 stereo.i_align_depth: true 时，立体视觉输出会对齐到由 stereo.i_board_socket_id 参数（默认为 0/CAM_A）指定的板载接口。

你可以通过设置，例如对于右侧流，设置 i_publish_right_rect: true 来启用校正后的立体视觉流。你也可以设置 i_publish_synced_rect_pair: true 来获取具有相同时间戳的两张图像。

### 立体视觉接口顺序

默认情况下，右相机在用于立体视觉计算时被视为第一个，这反映在 CameraInfo 消息中。如果你想反转该逻辑，请设置 stereo.i_reverse_stereo_socket_order: true（这也可以为单个传感器设置）。

### 自定义传感器接口

用于计算立体视觉对的传感器配置可以通过编程方式完成，例如在构建自定义流程时在 Stereo 节点的构造函数中指定，或通过参数 stereo.i_left_socket_id/stereo.i_right_socket_id 指定。请注意，目前如果你想使用
RGB/中心接口而不是给定的某个对，你需要为此构建自定义流程。

## 特征跟踪器

每个传感器节点（以及来自 Stereo 节点的校正流）都可以选择添加 FeatureTracker 节点，该节点发布 depthai_ros_msgs/msg/TrackedFeatures 消息。 要启用特征，例如在 RGB 节点上，设置 rgb:
i_enable_feature_tracker: true。要启用在校正流上发布，设置例如 stereo: i_left_rect_enable_feature_tracker。

## 设置 IMU 参数

参数：

 * i_acc_freq: 400 - 加速度计传感器频率
 * i_acc_cov: 0.0 - 加速度计协方差
 * i_batch_report_threshold: 1 - 批量报告大小
 * i_enable_rotation: false - 是否启用旋转向量和磁力计数据（当使用 IMU_WITH_MAGN/IMU_WITH_MAGN_SPLIT 消息类型时可用）
 * i_gyro_cov: 0.0 - 陀螺仪协方差
 * i_gyro_freq: 400 - 陀螺仪频率
 * i_mag_cov: 0.0 - 磁力计协方差
 * i_mag_freq: 100 - 磁力计频率
 * i_max_batch_reports: 10 - 每批最大报告数
 * i_message_type: IMU - ROS 发布者类型：
 * IMU - sensor_msgs/Imu
 * IMU_WITH_MAG - depthai_ros_msgs/ImuWithMagneticField
 * IMU_WITH_MAG_SPLIT - 两个发布者 - sensor_msgs/Imu 和 sensor_msgs/MagneticField
 * i_rot_cov: -1.0 - 旋转协方差
 * i_rot_freq: 400 - 旋转频率
 * i_sync_method: LINEAR_INTERPOLATE_ACCEL - 同步方法。可用选项：
 * COPY
 * LINEAR_INTERPOLATE_GYRO
 * LINEAR_INTERPOLATE_ACCEL
 * i_rotation_vector_type - 旋转向量类型，更多信息请参考此[链接](https://docs.luxonis.com/software/depthai-components/nodes/imu.md)。可用选项：
 * ROTATION_VECTOR
 * GAME_ROTATION_VECTOR
 * GEOMAGNETIC_ROTATION_VECTOR
 * ARVR_STABILIZED_ROTATION_VECTOR
 * ARVR_STABILIZED_GAME_ROTATION_VECTOR

## 停止/启动相机以节能/重新配置

停止相机也可用于节能，因为流程会从设备中移除。当相机停止时，话题也会被移除。

还有一个选项可以在相机遇到错误时启用自动重启。为此，设置 camera.i_restart_on_diagnostics_error: true。

## 流程参数

对于参数本身，有几个关键参数决定了相机的行为。

 * camera_i_pipeline_type 可以是：
 * RGB - 仅发布 RGB 流，NN 可用
 * RGBD - 发布 RGB + 深度流（设置 i_publish_topic 为左、右相机以启用它们），NN 和 Spatial NN 可用
 * Stereo - 发布来自左右传感器的流，NN 可以为每个传感器单独设置
 * RGBStereo - 发布 RGB + 左 + 右流，NN 可以为每个传感器单独设置
 * Depth - 仅发布深度流，NN 可以通过参数在立体视觉节点上设置
 * CamArray - 发布所有检测到的传感器的流，NN 可以为每个传感器单独设置
 * Tof - 仅发布 TOF 流，没有 NN 可用
 * DepthTof - 发布深度 + TOF 流，特定于 OAK-D-SR-POE，NN 可以通过参数在立体视觉节点上设置
 * StereoToF - 发布立体视觉 + TOF 流，特定于 OAK-D-SR-POE，NN 可以通过参数在立体视觉节点上设置
 * RGBToF - 发布 RGB + TOF 流，特定于 OAK-D-SR-POE，NN 可以通过参数在立体视觉节点上设置 这告诉相机是否应加载立体视觉组件。默认设置为 RGBD。 也可以创建自定义流程，因为所有类型都被定义为插件。

为了做到这一点，你可以创建一个自定义包（假设名为 test_plugins），在该包中创建一个可执行文件（test_plugins.cpp）。在该文件中，定义一个继承自
depthai_ros_driver::pipeline_gen::BasePipeline 并重写 createPipeline 方法的自定义插件。

之后导出该插件，例如：

```c++
#include <pluginlib /class_list_macros.hpp>
  PLUGINLIB_EXPORT_CLASS(test_plugins::Test, depthai_ros_driver::pipeline_gen::BasePipeline)
```

添加插件定义：

```xml
<library path="test_plugins">
    <class type="test_plugins::Test" base_class_type="depthai_ros_driver::pipeline_gen::BasePipeline">
      <description>测试管道。</description>
    </class>
  </library>
```

现在你可以将创建的插件用作管道，只需将 camera.i_pipeline_type 设置为 test_plugins::Test。

## 神经网络

配置带有3个传感器的相机的基本选项可以通过3个 camera 参数控制：

 * camera.i_nn_type 可以是 none、rgb 或 spatial。它决定加载的神经网络是否需要深度信息（例如，提供3D格式的检测结果）。默认设置为 spatial。
 * camera.i_mx_id / camera.i_ip / camera.i_usb_port_id 用于连接到特定相机。如果未设置，会自动连接到下一个可用设备。你可以通过运行默认启动文件从日志中获取这些参数。
 * nn.i_nn_config_path 表示包含加载何种神经网络以及使用何种参数的JSON文件路径。目前我们提供加载MobileNet、Yolo和Segmentation（不支持spatial）模型的选项。要查看它们的示例配置，请跳转到
   depthai_ros_driver/config/nn。默认为 depthai_ros_driver 中的 mobilenet.json。

要使用提供的示例神经网络，你可以将路径设置为：

 * depthai_ros_driver/segmentation
 * depthai_ros_driver/mobilenet
 * depthai_ros_driver/yolo

你也可以选择通过在特定传感器上设置 sensor_name.i_enable_nn 为 true 来运行神经网络。之后，你可以类似地设置 sensor_name_nn.i_nn_config_path 为配置文件的路径。
你还可以为立体节点设置spatial神经网络，并将其左/右流之一用作RGB输入。这可以在具有RGB侧面传感器的相机（如OAK-D-SR和OAK-D-LR）上启用。设置步骤类似：

 * stereo.i_enable_spatial_nn — 设置为true以启用spatial神经网络
 * stereo.i_spatial_nn_source — 设置为 left 或 right，选择用作神经网络RGB输入的传感器
 * stereo_nn.i_nn_config_path — spatial神经网络配置文件的路径

所有可用的相机特定参数及其默认值可以在 depthai_ros_driver/config/camera.yaml 中查看。

## 同步

目前，你可以使用同步节点封装器同步任意数量的图像话题。要创建同步节点，设置 pipeline_gen: i_enable_sync: true，例如 rgb.i_synced: true 和 stereo.i_synced: true。 当使用
pointcloud.enable:=true 参数运行 camera.launch.py 时，会应用此示例配置。

## 特定相机配置

### PoE相机

由于PoE相机使用的协议吞吐量低于USB，运行默认相机启动可能会导致延迟，具体取决于所选择的分辨率/帧率。为了解决此问题，你可以使用编码帧，这可以在降低图像质量（因压缩导致）的同时保持所需的分辨率/帧率。此外，在此模式下禁用 subpixel
深度滤波。要启用低带宽模式，例如对于RGB相机，更改参数：

 * rgb.i_low_bandwidth — 设置为 true 以启用
 * rgb.i_low_bandwidth_quality — 期望的质量百分比（默认50） 有关所有流的示例参数，请参见 low_bandwidth.yaml 文件。

### ToF相机

OAK-D-SR-PoE由于其特定的配置，需要一个单独的启动文件 — sr_poe_rgbd_pcl.launch.py。 这也利用了OAK-D-SR特定的管道配置，你可以在上方找到关于管道类型的更多信息。 请注意，由于传感器插座命名约定，ToF相机目前以
rgb 帧发布图像。

## RealSense兼容性

为了快速集成测试，你可以使用 camera.launch.py 并带 rs_compat:=true 参数来模拟Realsense相机行为。 这将设置相机使用RGBD管道，并以与Realsense相机兼容的名称发布话题。
TF帧也将以Realsense格式提供。与RS节点类似，你可以使用 pointcloud.enable:=true 参数启用点云发布。 请注意，驱动将以不同的名称和命名空间生成，并且DAI节点名称也会不同，因此你可能需要相应调整配置文件。 命名约定如下：

 * 命名空间：'' → camera
 * 节点名称：oak → camera
 * rgb → color
 * stereo → depth
 * left → infra_2
 * right → infra_1
 * 帧 oak → camera_link

### 示例

让我们来看看启动文件需要做哪些更改：

```python
# RealSense 驱动包含示例
rs_camera_launch_include = IncludeLaunchDescription(
  PythonLaunchDescriptionSource([
      PathJoinSubstitution([
          FindPackageShare('realsense2_camera'),
          'launch',
          'rs_launch.py',
      ])
  ]),
  launch_arguments={
      'pointcloud.enable': true,
  }.items()
)
```

以下启动描述将以 RGBD 模式运行相机驱动并启用点云。 现在要改为使用 OAK 相机，你需要进行如下更改：

```python
# OAK 驱动包含示例
oak_camera_launch_include = IncludeLaunchDescription(
  PythonLaunchDescriptionSource([
      PathJoinSubstitution([
          FindPackageShare('depthai_ros_driver'),
          'launch',
          'camera.launch.py',
      ])
  ]),
  launch_arguments={
      'rs_compat': true,
      'pointcloud.enable': true,
  }.items()
)
```

这将启动具有相同主题的相机，唯一的变化是深度默认配置为 1280x720x30 而非 848x480x30。

### 使用 RealSense 兼容模式的 RTABMap 示例

让我们看看 rtabmap_ros 包中的一个示例 realsense_d435i_color.launch.py。 注意：截至本文撰写时（2024-08-27），此示例需要根据 RS 主题名称调整如下：

#### 修改前

```python
remappings=[
('imu', '/imu/data'),
('rgb/image', '/camera/color/image_raw'),
('rgb/camera_info', '/camera/color/camera_info'),
('depth/image', '/camera/realigned_depth_to_color/image_raw')]
```

#### 修改后

```python
remappings=[
('imu', '/imu/data'),
('rgb/image', '/camera/camera/color/image_raw'),
('rgb/camera_info', '/camera/camera/color/camera_info'),
('depth/image', '/camera/camera/depth/image_rect_raw')]
```

现在要使用 RS 相机启动该示例，根据说明需要运行以下命令：

```bash
ros2 launch realsense2_camera rs_launch.py enable_gyro:=true enable_accel:=true unite_imu_method:=1 enable_sync:=true
```

要使用 OAK 相机启动相同示例，你需要运行以下命令：

```bash
ros2 launch depthai_ros_driver camera.launch.py rs_compat:=true
```

注意，ROS2 节点的推荐做法是使用组件（components）来提高性能并减少延迟。 RS 相机驱动没有提供专用的启动文件来在组件容器中运行相机节点（除了 intra_process_demo），因此你需要为此创建一个自定义容器。 DepthAI ROS
驱动的默认启动文件默认以组合模式运行，因此你可以在运行时向同一容器添加更多节点。 你也可以参考 depthai_ros_driver 包中的 rtabmap.launch.py 示例来使用 OAK 相机运行 RTABMap。在该示例基础上稍加修改也可以启用
RS 模式。

## 重新标定

如果你希望使用设备提供之外的标定值，可以通过以下方式实现：

 * 使用每个图像流可用的 set_camera_info 服务
 * 使用 i_calibration_file 参数指定标定文件。注意：相机名称必须以 / 开头，例如 /rgb。参见 depthai_ros_driver/config/calibration 中的示例标定文件。 提供了
   calibration.launch 文件来启动 ROS 相机标定节点，支持单目和立体配置。 标定文件语法（来自 camera_info_manager）：

```yaml
- file:///full/path/to/local/file.yaml
- file:///full/path/to/videre/file.ini
- package://camera_info_manager/tests/test_calibration.yaml
- package://ros_package_name/calibrations/camera3.yaml
```

## 使用外部图像源进行 NN 推理或立体深度计算

可以将外部图像主题作为 NN 或深度计算的输入。

## 示例场景

 1. 我们想根据 USB 相机节点发布的图像获取分割或 2D 检测输出。 这可以通过将 rgb.i_simulate_from_topic 参数设置为 true 来实现。这会创建一个默认监听 /<node_name>/rgb/input 主题的
    sensor_msgs/Image 订阅器，并在每次回调时将数据传入管道。 主题名称可以通过经典的 ROS 主题重映射或设置 rgb.i_simulated_topic_name 来更改。 默认情况下，原始传感器节点仍然运行并发布数据。将
    rgb.i_disable_node 设置为 true 可以阻止其生成。查看 depthai_filters 中的 det2d_usb_cam_overlay.launch.py 了解实际应用。

 2. 深度计算——left 和 right 传感器节点可以像上面示例一样设置，以从外部主题计算深度/视差。注意，要使其正常工作，你需要指定：

 * left.i_board_socket_id: 1
 * right.i_board_socket_id: 2
 * 默认立体输入尺寸为 1280x720；若图像尺寸不同，可设置 stereo.i_set_input_size: true，并相应调整 stereo.i_input_width 和 stereo.i_input_height。
 * 使用 camera.i_external_calibration_path 参数指定外部标定文件路径。要从设备获取标定数据，你可以将 camera.i_calibration_dump 设置为 true，或调用 save_calibration
   服务。标定数据将保存到 /tmp/<mx_id>_calibration.json。 示例可见 depthai_ros_driver 中的 stereo_from_rosbag.launch.py。

## 开发者指南

为了在隔离的工作区中更方便地进行开发，可以使用 Visual Studio Code 以及 DevContainers 插件，具体操作如下：

 * 创建独立的工作区
 * 将仓库克隆到 src 目录
 * 将 .devcontainer 目录复制到主工作区目录中
 * 在 VSCode 中打开工作区目录

## 参数列表

```yaml
/oak:
ros__parameters:
  camera:
    i_calibration_dump: false
    i_enable_diagnostics: true
    i_enable_ir: true
    i_enable_sync: false
    i_external_calibration_path: ""
    i_floodlight_brightness: 0
    i_ip: ""
    i_laser_dot_brightness: 800
    i_mx_id: ""
    i_nn_type: none
    i_pipeline_dump: false
    i_pipeline_type: RGBD
    i_publish_tf_from_calibration: false
    i_restart_on_diagnostics_error: false
    i_rs_compat: false
    i_tf_base_frame: oak
    i_tf_cam_pitch: "0.0"
    i_tf_cam_pos_x: "0.0"
    i_tf_cam_pos_y: "0.0"
    i_tf_cam_pos_z: "0.0"
    i_tf_cam_roll: "0.0"
    i_tf_cam_yaw: "0.0"
    i_tf_camera_model: ""
    i_tf_camera_name: oak
    i_tf_custom_urdf_location: ""
    i_tf_custom_xacro_args: ""
    i_tf_imu_from_descr: "false"
    i_tf_parent_frame: oak-d-base-frame
    i_usb_port_id: ""
    i_usb_speed: SUPER_PLUS
    diagnostic_updater:
    period: 1.0
  pipeline_gen:
    i_enable_diagnostics: true
    i_enable_imu: true
    i_enable_sync: false
  imu:
    i_acc_cov: 0.0
    i_acc_freq: 400
    i_batch_report_threshold: 5
    i_enable_rotation: false
    i_get_base_device_timestamp: false
    i_gyro_cov: 0.0
    i_gyro_freq: 400
    i_mag_cov: 0.0
    i_max_batch_reports: 10
    i_message_type: IMU
    i_rot_cov: -1.0
    i_sync_method: LINEAR_INTERPOLATE_ACCEL
    i_update_ros_base_time_on_ros_msg: false
  left:
    i_add_exposure_offset: false
    i_board_socket_id: 1
    i_calibration_file: ""
    i_disable_node: false
    i_enable_feature_tracker: false
    i_enable_lazy_publisher: true
    i_enable_nn: false
    i_exposure_offset: 0
    i_fps: 30.0
    i_fsync_continuous: false
    i_fsync_trigger: false
    i_get_base_device_timestamp: false
    i_height: 720
    i_low_bandiwdth_frame_freq: 30
    i_low_bandwidth: false
    i_low_bandwidth_bitrate: 0
    i_low_bandwidth_ffmpeg_encoder: libx264
    i_low_bandwidth_profile: 4
    i_low_bandwidth_quality: 50
    i_max_q_size: 30
    i_publish_compressed: false
    i_publish_topic: false
    i_resolution: 720P
    i_reverse_stereo_socket_order: false
    i_sensor_img_orientation: AUTO
    i_set_isp3a_fps: false
    i_simulate_from_topic: false
    i_simulated_topic_name: ""
    i_synced: false
    i_update_ros_base_time_on_ros_msg: false
    i_width: 1280
    r_exposure: 1000
    r_iso: 800
    r_set_man_exposure: false
  nn:
    i_board_socket_id: 0
    i_disable_resize: false
    i_enable_passthrough: false
    i_enable_passthrough_depth: false
    i_get_base_device_timestamp: false
    i_num_inference_threads: 2
    i_num_pool_frames: 4
    i_update_ros_base_time_on_ros_msg: false
  rgb:
    i_add_exposure_offset: false
    i_board_socket_id: 0
    i_calibration_file: ""
    i_disable_node: false
    i_enable_feature_tracker: false
    i_enable_lazy_publisher: true
    i_enable_nn: false
    i_enable_preview: false
    i_exposure_offset: 0
    i_fps: 30.0
    i_fsync_continuous: false
    i_fsync_trigger: false
    i_get_base_device_timestamp: false
    i_height: 720
    i_interleaved: false
    i_isp_den: 3
    i_isp_num: 2
    i_keep_preview_aspect_ratio: true
    i_low_bandiwdth_frame_freq: 30
    i_low_bandwidth: true
    i_low_bandwidth_bitrate: 0
    i_low_bandwidth_ffmpeg_encoder: libx264
    i_low_bandwidth_profile: 4
    i_low_bandwidth_quality: 50
    i_max_q_size: 30
    i_output_isp: true
    i_preview_height: 300
    i_preview_size: 300
    i_preview_width: 300
    i_publish_compressed: false
    i_publish_topic: true
    i_resolution: 1080P
    i_reverse_stereo_socket_order: false
    i_sensor_img_orientation: AUTO
    i_set_isp3a_fps: false
    i_set_isp_scale: true
    i_simulate_from_topic: false
    i_simulated_topic_name: ""
    i_synced: false
    i_update_ros_base_time_on_ros_msg: false
    i_width: 1280
    r_exposure: 20000
    r_focus: 1
    r_iso: 800
    r_set_man_exposure: false
    r_set_man_focus: false
    r_set_man_whitebalance: false
    r_whitebalance: 3300
  right:
    i_add_exposure_offset: false
    i_board_socket_id: 2
    i_calibration_file: ""
    i_disable_node: false
    i_enable_feature_tracker: false
    i_enable_lazy_publisher: true
    i_enable_nn: false
    i_exposure_offset: 0
    i_fps: 30.0
    i_fsync_continuous: false
    i_fsync_trigger: false
    i_get_base_device_timestamp: false
    i_height: 720
    i_low_bandiwdth_frame_freq: 30
    i_low_bandwidth: false
    i_low_bandwidth_bitrate: 0
    i_low_bandwidth_ffmpeg_encoder: libx264
    i_low_bandwidth_profile: 4
    i_low_bandwidth_quality: 50
    i_max_q_size: 30
    i_publish_compressed: false
    i_publish_topic: false
    i_resolution: 720P
    i_reverse_stereo_socket_order: false
    i_sensor_img_orientation: AUTO
    i_set_isp3a_fps: false
    i_simulate_from_topic: false
    i_simulated_topic_name: ""
    i_synced: false
    i_update_ros_base_time_on_ros_msg: false
    i_width: 1280
    r_exposure: 1000
    r_iso: 800
    r_set_man_exposure: false

  stereo:
    i_add_exposure_offset: false
    i_align_depth: true
    i_bilateral_sigma: 0
    i_board_socket_id: 0
    i_depth_filter_size: 5
    i_depth_preset: HIGH_ACCURACY
    i_disparity_width: DISPARITY_96
    i_enable_alpha_scaling: false
    i_alpha_scaling: 0.0
    i_enable_brightness_filter: false
    i_brightness_filter_min_brightness: 0
    i_brightness_filter_max_brightness: 256
    i_enable_companding: false
    i_enable_decimation_filter: false
    i_decimation_filter_decimation_mode: PIXEL_SKIPPING
    i_decimation_filter_decimation_factor: 1
    i_enable_disparity_shift: false
    i_disparity_shift: 0
    i_enable_distortion_correction: false
    i_enable_lazy_publisher: true
    i_enable_spatial_filter: false
    i_spatial_filter_hole_filling_radius: 2
    i_spatial_filter_alpha: 0.5
    i_spatial_filter_delta: 20
    i_spatial_filter_iterations: 1
    i_enable_spatial_nn: false
    i_enable_speckle_filter: false
    i_speckle_filter_speckle_range: 50
    i_enable_temporal_filter: false
    i_temporal_filter_alpha: 0.4
    i_temporal_filter_delta: 20
    i_temporal_filter_persistency: VALID_2_IN_LAST_4
    i_enable_threshold_filter: false
    i_threshold_filter_min_range: 400
    i_threshold_filter_max_range: 15000
    i_exposure_offset: 0
    i_extended_disp: false
    i_get_base_device_timestamp: false
    i_height: 720
    i_left_rect_add_exposure_offset: false
    i_left_rect_enable_feature_tracker: false
    i_left_rect_exposure_offset: 0
    i_left_rect_low_bandwidth: false
    i_left_rect_low_bandwidth_bitrate: 0
    i_left_rect_low_bandwidth_ffmpeg_encoder: libx264
    i_left_rect_low_bandwidth_frame_freq: 30
    i_left_rect_low_bandwidth_profile: 4
    i_left_rect_low_bandwidth_quality: 50
    i_left_rect_publish_compressed: false
    i_left_rect_synced: true
    i_left_socket_id: 1
    i_low_bandwidth: false
    i_low_bandwidth_bitrate: 0
    i_low_bandwidth_ffmpeg_encoder: libx264
    i_low_bandwidth_profile: 4
    i_low_bandwidth_quality: 50
    i_lr_check: true
    i_lrc_threshold: 10
    i_max_q_size: 30
    i_output_disparity: false
    i_publish_left_rect: false
    i_publish_right_rect: false
    i_publish_synced_rect_pair: false
    i_publish_topic: true
    i_rectify_edge_fill_color: 0
    i_reverse_stereo_socket_order: false
    i_right_rect_add_exposure_offset: false
    i_right_rect_enable_feature_tracker: false
    i_right_rect_exposure_offset: 0
    i_right_rect_low_bandwidth: false
    i_right_rect_low_bandwidth_bitrate: 0
    i_right_rect_low_bandwidth_ffmpeg_encoder: libx264
    i_right_rect_low_bandwidth_frame_freq: 30
    i_right_rect_low_bandwidth_profile: 4
    i_right_rect_low_bandwidth_quality: 50
    i_right_rect_publish_compressed: false
    i_right_rect_synced: true
    i_right_socket_id: 2
    i_set_disparity_to_depth_use_spec_translation: false
    i_set_input_size: false
    i_socket_name: rgb
    i_spatial_nn_source: right
    i_stereo_conf_threshold: 240
    i_subpixel: true
    i_subpixel_fractional_bits: 3
    i_synced: false
```

i_update_ros_base_time_on_ros_msg: false i_width: 1280 use_sim_time: false tof: i_publish_topic: true i_synced: true
i_calibration_file: "" i_low_bandwidth: false # 启用低带宽模式目前可能无法正常工作 i_low_bandwidth_bitrate: 0 i_low_bandwidth_ffmpeg_encoder:
libx264 i_low_bandwidth_profile: 4 i_low_bandwidth_quality: 80 i_get_base_device_timestamp: false
i_update_ros_base_time_on_ros_msg: false i_enable_lazy_publisher: false i_add_exposure_offset: false i_exposure_offset: 0
i_reverse_stereo_socket_order: false i_board_socket_id: 0 i_max_q_size: 8 i_width: 640 i_height: 480 i_fps: 30.0
i_enable_optical_correction: false i_enable_fppn_correction: false i_enable_temperature_correction: false
i_enable_wiggle_correction: false i_enable_phase_unwrapping: false i_enable_phase_shuffle_temporal_filter: true
i_phase_unwrapping_level: 4 i_phase_unwrap_error_threshold: 100 i_median_filter: MEDIAN_OFF
