docs: enhance compressed image documentation with launch parameters and troubleshooting tips

This commit is contained in:
ob-yalian
2026-06-08 14:37:16 +08:00
parent bd53c9f235
commit 74e6cac337
4 changed files with 144 additions and 21 deletions
@@ -1,11 +1,77 @@
### Compressed Image
You can use `image_transport` to compress the image using `jpeg`. Below is an example of how to use it:
OrbbecSDK ROS2 supports publishing compressed image topics through `image_transport`. This is useful for reducing network bandwidth, viewing images remotely, and subscribing to the compressed color image directly when `color_format:=MJPG` is used to reduce host-side decoding overhead.
To access the compressed color image, you can use the following command:
## Related Launch Parameters
Compressed image publishing is controlled by the following launch parameters:
| Parameter | Default Value | Description |
| --- | --- | --- |
| `color.image_raw.enable_pub_plugins` | `["image_transport/compressed", "image_transport/raw", "image_transport/theora"]` | Color image publishing plugins. |
| `depth.image_raw.enable_pub_plugins` | `["image_transport/compressedDepth", "image_transport/raw"]` | Depth image publishing plugins. |
| `left_ir.image_raw.enable_pub_plugins` | `["image_transport/compressed", "image_transport/raw", "image_transport/theora"]` | Left IR image publishing plugins. |
| `right_ir.image_raw.enable_pub_plugins` | `["image_transport/compressed", "image_transport/raw", "image_transport/theora"]` | Right IR image publishing plugins. |
If you only need compressed color images, keep the `compressed` and `raw` plugins in the launch command, for example:
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py \
color.image_raw.enable_pub_plugins:='["image_transport/compressed", "image_transport/raw"]'
```
If you only need raw images, keep only the `raw` plugin, for example:
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py \
color.image_raw.enable_pub_plugins:='["image_transport/raw"]'
```
## Common Compressed Image Topics
The default camera namespace is `/camera`. If you change `camera_name` when launching the camera, replace `/camera` in the following topics with the actual namespace.
| Stream | Compressed Image Topic |
| --- | --- |
| Color image | `/camera/color/image_raw/compressed` |
| Depth image | `/camera/depth/image_raw/compressedDepth` |
| Left IR image | `/camera/left_ir/image_raw/compressed` |
| Right IR image | `/camera/right_ir/image_raw/compressed` |
View compressed color image messages:
```bash
ros2 topic echo /camera/color/image_raw/compressed --no-arr
```
This command will allow you to receive the compressed color image from the specified topic.
View compressed depth image messages:
```bash
ros2 topic echo /camera/depth/image_raw/compressedDepth --no-arr
```
## `color_format:=MJPG` Scenario
When the color stream uses `color_format:=MJPG`, the ROS wrapper directly publishes `/camera/color/image_raw/compressed`. Subscribing to this topic avoids extra host-side MJPG decoding and usually reduces CPU usage.
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py color_format:=MJPG
```
In this case, subscribe to:
```bash
ros2 topic echo /camera/color/image_raw/compressed --no-arr
```
If you subscribe to `/camera/color/image_raw`, the MJPG image still needs to be decoded on the host, which increases CPU usage. For more low-CPU configuration suggestions, see [Reducing CPU Usage](../5_advanced_guide/performance/lower_cpu_usage.md).
## Troubleshooting
If you do not see compressed image topics, check the topic list first:
```bash
ros2 topic list | grep image_raw
```
Then confirm that the corresponding `*.image_raw.enable_pub_plugins` parameter has not been changed to enable only `raw`, and make sure the related `image_transport` plugins are installed.
@@ -1,6 +1,6 @@
## Reducing CPU Usage with Orbbec ROS Package
You can find example usage code in the [example](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples).
You can refer to the low-CPU launch configuration in [gemini_330_series_low_cpu.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/launch/gemini_330_series_low_cpu.launch.py).
This document outlines strategies for minimizing CPU usage in the **OrbbecSDK_ROS2 v2** environment when using **Gemini 330 series cameras**. The firmware version must be **no lower than 1.4.10**, and `device` should be set to **Default**.