docs: add SDK bag recording and playback instructions to quickstart and services documentation

This commit is contained in:
ob-yalian
2026-06-22 15:03:55 +08:00
parent e61cc482a5
commit 7ac59879ae
6 changed files with 118 additions and 0 deletions
@@ -94,3 +94,33 @@ ros2 service call /camera/get_device_info orbbec_camera_msgs/srv/GetDeviceInfo '
```bash
ros2 bag record /camera/color/image_raw /camera/depth/image_raw
```
#### Record and play back with SDK bag
SDK bag recording uses the Orbbec SDK to record device data. It is useful when you want to restart the wrapper later with the recording as a playback device. Record when launching:
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py bag_record_filename:=/tmp/orbbec_record.bag
```
You can also start or stop recording while the node is running:
```bash
ros2 service call /camera/set_bag_recording orbbec_camera_msgs/srv/SetBagRecording "{enable: true, file_path: '/tmp/orbbec_record.bag'}"
```
```bash
ros2 service call /camera/set_bag_recording orbbec_camera_msgs/srv/SetBagRecording "{enable: false, file_path: ''}"
```
Play back an SDK bag:
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py bag_filename:=/tmp/orbbec_record.bag
```
Loop playback:
```bash
ros2 launch orbbec_camera gemini_330_series.launch.py bag_filename:=/tmp/orbbec_record.bag bag_loop:=true
```
@@ -88,6 +88,12 @@ The following are the launch parameters available:
* Enable Right IR image transport plugins. Default: `["image_transport/compressed", "image_transport/raw", "image_transport/theora"]`. See [Compressed Image](compressed_image.md) for subscribing to compressed images.
* **`point_cloud_decimation_filter_factor`**
* Point cloud downsampling factor. Range: `1–8`. `1` means no downsampling.
* **`bag_record_filename`**
* Record device data to the specified SDK `.bag` file after startup. Leave empty to disable automatic recording. When recording starts, a JSON preset file with the same base name is also exported, for example `record.bag` creates `record.json`.
* **`bag_filename`**
* Play back the specified SDK `.bag` file. When set, the node creates a playback device from the bag file instead of connecting to a physical camera.
* **`bag_loop`**
* Loop SDK bag playback after the file reaches the end. Default: `false`. This only takes effect when `bag_filename` is set.
## Sensor Controls
@@ -175,6 +181,9 @@ The following are the launch parameters available:
* Enable the software trigger out signal / set the software trigger period in ms.
* **`frames_per_trigger`**
* The frame number of each stream after each trigger in triggering mode.
* **`sync_io_voltage_level`**
* Set the sync IO voltage level. Default: `-1`, which means do not set it. This is only supported on devices that expose the property; it can also be changed at runtime with `/camera/set_sync_io_voltage_level`.
> **Supported Modules**: Gemini 305 series.
### Network Cameras
* **`enumerate_net_device`**
@@ -310,8 +319,10 @@ The following are the launch parameters available:
* The path to the YAML configuration file. Default is `""`. If not specified, default parameters from the launch file will be used. Some presets or special modes are configured through YAML. See [predefined presets](../5_advanced_guide/configuration/predefined_presets.md).
* **`load_config_json_file_path`**
* SDK JSON configuration import path. When set, the node imports the JSON configuration during initialization. For Gemini 330 series, use `gemini_330_series_sdk_json.launch.py` as the dedicated SDK JSON launch file.
* If the JSON contains `application_config`, the node syncs stream enable states, resolution, frame rate, format, undistortion, point cloud, HDR merge, and device-level decimation from it when those values are not explicitly overridden by launch parameters.
* **`export_config_json_file_path`**
* SDK JSON configuration export path. When set, the node exports the current device configuration to JSON after initialization. You can also export at runtime with the `/camera/export_config_json` service.
* Before export, the node syncs the current ROS sensor stream, point cloud, and HDR merge settings into the SDK `application_config` when the device supports it.
* **`frame_aggregate_mode`**
* Set frame aggregate output mode. Optional values: `full_frame`, `color_frame`, `ANY`, `disable`.
* This parameter is case-insensitive. Invalid values are reported and replaced with the default value.
@@ -157,6 +157,11 @@
```bash
ros2 service call /camera/get_device_info orbbec_camera_msgs/srv/GetDeviceInfo
```
* `/camera/get_device_config`
Get the currently effective device configuration state, such as preset, alignment mode, time domain, sync mode, and frame aggregate mode.
```bash
ros2 service call /camera/get_device_config orbbec_camera_msgs/srv/GetDeviceConfig '{}'
```
* `/camera/get_sdk_version`
```bash
ros2 service call /camera/get_sdk_version orbbec_camera_msgs/srv/GetString
@@ -165,6 +170,14 @@
```bash
ros2 service call /camera/export_config_json orbbec_camera_msgs/srv/SetString "{data: '/tmp/orbbec_camera_config.json'}"
```
* `/camera/set_bag_recording`
Record current device data with SDK bag recording. `enable: true` starts recording and `enable: false` stops recording. When `file_path` is empty, the default file name is created in the current working directory.
```bash
ros2 service call /camera/set_bag_recording orbbec_camera_msgs/srv/SetBagRecording "{enable: true, file_path: '/tmp/orbbec_record.bag'}"
```
```bash
ros2 service call /camera/set_bag_recording orbbec_camera_msgs/srv/SetBagRecording "{enable: false, file_path: ''}"
```
* `/camera/reboot_device`
```bash
ros2 service call /camera/reboot_device std_srvs/srv/Empty '{}'
@@ -190,6 +203,11 @@
# Only available if interleave_ae_mode is 'laser' and interleave_frame_enable is true
ros2 service call /camera/set_sync_interleaverlaser orbbec_camera_msgs/srv/SetInt32 '{data: 0}'
```
* `/camera/set_sync_io_voltage_level`
Set the sync IO voltage level. This is only supported on devices that expose the property.
```bash
ros2 service call /camera/set_sync_io_voltage_level orbbec_camera_msgs/srv/SetInt32 '{data: 0}'
```
### Depth Filter Configuration