mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-08 22:07:46 +08:00
docs: document ROS2 color queue diagnostics
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
* 如需降低 CPU 使用率,可参考 [降低 CPU 使用率](../5_advanced_guide/performance/lower_cpu_usage.md) 中的 `color_format` 建议。
|
||||
* **`enable_[color|depth|left_ir|right_ir|ir]`**
|
||||
* 启用或关闭对应图像流。
|
||||
* **`color_frame_queue_max_frames`**、**`left_color_frame_queue_max_frames`**、**`right_color_frame_queue_max_frames`**
|
||||
* 设置对应彩色帧线程缓存的最大帧数,默认值为 `10`。队列满时会丢弃最旧帧,并增加溢出计数;当前队列长度和溢出统计可通过 `/camera/get_color_queue_stats` 查询。
|
||||
* **`[color|depth|left_ir|right_ir|ir]_rotation`**
|
||||
* 设置流图像旋转。
|
||||
* 可能的值为 `0`、`90`、`180`、`270`。
|
||||
|
||||
@@ -108,6 +108,22 @@
|
||||
ros2 service call /camera/set_streams_enable std_srvs/srv/SetBool '{data: false}'
|
||||
```
|
||||
|
||||
### 彩色帧队列诊断
|
||||
|
||||
* `/camera/get_color_queue_stats`
|
||||
|
||||
该服务使用 `std_srvs/srv/SetBool`。请求值为 `false` 时查询当前统计信息;请求值为 `true` 时查询并重置累计统计信息。
|
||||
|
||||
```bash
|
||||
ros2 service call /camera/get_color_queue_stats std_srvs/srv/SetBool '{data: false}'
|
||||
```
|
||||
|
||||
响应的 `message` 字段为 JSON,包含总 `overflow_count` 和 `queues` 对象。每个已启用队列会报告 `capacity_frames`、`queue_size`、`max_queue_size`、`overflow_count`、`oldest_queue_wait_ms` 和 `max_queue_wait_ms`。响应同时包含节点 `namespace` 以及是否执行了统计重置的 `statistics_reset` 字段。
|
||||
|
||||
```bash
|
||||
ros2 service call /camera/get_color_queue_stats std_srvs/srv/SetBool '{data: true}'
|
||||
```
|
||||
|
||||
### 运行时数据流配置
|
||||
|
||||
* `/camera/set_stream_profile`
|
||||
|
||||
Reference in New Issue
Block a user