> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 使用 orbbec_camera 启用 Orbbec Gemini 335L

> orbbec_camera 示例应用使 Orbbec Gemini 335L 摄像头能够在 RGB 或深度模式下工作。该应用通过话题生成 RGB 和深度信息。

`orbbec_camera` 是 OrbbecSDK ROS2 Wrapper，它在 ROS 2 环境中提供 Orbbec 摄像头的集成。

## `orbbec_camera` 的管道流程

下图展示了 `orbbec_camera` 的管道流程。

![Orbbec Camera 335L feeding the orbbec\_camera ROS node, which publishes color, depth, point cloud, and gyro-accel topics.](https://mintlify.s3.us-west-1.amazonaws.com/qualcomm-prod/zh/SDKs/QIR-SDK-Ubuntu/images/image3.png)

orbbec\_camera 管道。

## `orbbec_camera` 管道中使用的 ROS 话题

下表列出了 `orbbec_camera` 管道中使用的 ROS 话题，以及每个话题的消息类型和说明。

| ROS 话题 | 类型 | 说明 |
| - | - | - |
| `/camera/color/camera_info` | `<sensor_msgs::msg::CameraInfo>` | 由 `orbbec_camera` 节点发布。 |
| `/camera/color/image_raw` | `<sensor_msgs::msg::Image>` | 由 `orbbec_camera` 节点发布。 |
| `/camera/depth/camera_info` | `<sensor_msgs::msg::CameraInfo>` | 由 `orbbec_camera` 节点发布。 |
| `/camera/depth/image_raw` | `<sensor_msgs::msg::Image>` | 由 `orbbec_camera` 节点发布。 |
| `/camera/depth/points` | `<sensor_msgs::msg::PointCloud2>` | 由 `orbbec_camera` 节点发布。 |
| `/camera/gyro_accel/sample` | `<sensor_msgs::msg::Imu>` | 由 `orbbec_camera` 节点发布。 |

## 前提条件

* 你已根据[安装 QIR SDK](https://dragonwingdocs.qualcomm.com/zh/SDKs/QIR-SDK-Ubuntu/install-the-qir-sdk.md)完成设备设置，并在设备上安装了 ROS2 Jazzy 和 Qualcomm Intelligent Robotics (QIR) SDK。

* 连接 Orbbec Gemini 335L 摄像头的 USB 端口。

## 开箱即用运行 `orbbec_camera`

**1. 安装 orbbec\_camera 包**

```bash Install the packages theme={null}
sudo apt install ros-jazzy-image-transport-plugins
sudo apt install ros-jazzy-orbbec-camera
```

**2. 安装 udev 规则**

```bash Install the udev rules theme={null}
sudo cp /opt/ros/jazzy/share/orbbec_camera/udev/99-obsensor-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
```

**3. 以三种模式之一运行 orbbec\_camera ROS 节点，每种模式都需要一个新的终端窗口**

```bash Enable the RGB module theme={null}
 source /opt/ros/jazzy/setup.bash
 ros2 launch orbbec_camera gemini_330_series.launch.py depth_registration:=false enable_depth:=false enable_point_cloud:=false color_width:=848 color_height:=480 color_fps:=30 color_qos:=default
```

```bash Enable the depth module theme={null}
source /opt/ros/jazzy/setup.bash
ros2 launch orbbec_camera gemini_330_series.launch.py depth_registration:=true enable_depth:=true enable_sync:=true enable_point_cloud:=false color_width:=848 color_height:=480 color_fps:=30 depth_fps:=30
```

```bash Enable the IMU module theme={null}
source /opt/ros/jazzy/setup.bash
ros2 launch orbbec_camera gemini_330_series.launch.py depth_registration:=false enable_depth:=false enable_point_cloud:=false color_width:=640 color_height:=360 color_fps:=30 color_qos:=default enable_accel:=true enable_gyro:=true enable_sync_output_accel_gyro:=true
```

如果图像频率未达到设置值，请执行 Fast DDS 优化：

a. 按照 [Fast DDS Optimization](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/performance/fastdds_tuning.html) 中的步骤操作。

b. 重启摄像头。
