docs: document ROS2 color queue diagnostics

This commit is contained in:
ob-yalian
2026-08-26 14:27:04 +08:00
parent 0c78e5a104
commit a27ad53138
4 changed files with 36 additions and 0 deletions
@@ -65,6 +65,8 @@ The following are the launch parameters available:
* For lower CPU usage, see the `color_format` recommendations in [Lower CPU Usage](../5_advanced_guide/performance/lower_cpu_usage.md).
* **`enable_[color|depth|left_ir|right_ir|ir]`**
* Enable or disable the corresponding image stream.
* **`color_frame_queue_max_frames`**, **`left_color_frame_queue_max_frames`**, **`right_color_frame_queue_max_frames`**
* Set the maximum number of color frames buffered by the corresponding color-frame worker. The default is `10`; when the queue is full, the oldest frame is discarded and the overflow counter is incremented. The current queue size and overflow counters can be queried with `/camera/get_color_queue_stats`.
* **`[color|depth|left_ir|right_ir|ir]_rotation`**
* Set stream image rotation.
* The possible values are `0`, `90`, `180`, `270`.
@@ -108,6 +108,22 @@
ros2 service call /camera/set_streams_enable std_srvs/srv/SetBool '{data: false}'
```
### Color Queue Diagnostics
* `/camera/get_color_queue_stats`
This service uses `std_srvs/srv/SetBool`. Pass `false` to query the current statistics, or `true` to query and reset the accumulated statistics.
```bash
ros2 service call /camera/get_color_queue_stats std_srvs/srv/SetBool '{data: false}'
```
The JSON response in `message` contains the total `overflow_count` and a `queues` object. Each enabled queue reports `capacity_frames`, `queue_size`, `max_queue_size`, `overflow_count`, `oldest_queue_wait_ms`, and `max_queue_wait_ms`. The service also reports the node `namespace` and whether the statistics were reset in `statistics_reset`.
```bash
ros2 service call /camera/get_color_queue_stats std_srvs/srv/SetBool '{data: true}'
```
### Runtime Stream Configuration
* `/camera/set_stream_profile`