mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 06:17:46 +08:00
docs: update multi-camera synchronization guidance
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
ros2 run orbbec_camera list_devices_node
|
||||
```
|
||||
|
||||
- 将 `device_num` 参数设置为您拥有的相机数量。
|
||||
- 转到 `OrbbecSDK_ROS2/orbbec_camera/launch/multi_xxx.launch.py` 文件并更改 `usb_port`。
|
||||
- 不要忘记将 `include` 标签放在 `group` 标签内。
|
||||
否则,不同相机的参数值可能会被污染。
|
||||
@@ -31,7 +30,6 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
'camera_name': 'camera_01',
|
||||
'usb_port': '6-2.4.4.2', # replace your usb port here
|
||||
'device_num': '2'
|
||||
}.items()
|
||||
)
|
||||
|
||||
@@ -42,11 +40,10 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
'camera_name': 'camera_02',
|
||||
'usb_port': '6-2.4.1', # replace your usb port here
|
||||
'device_num': '2'
|
||||
}.items()
|
||||
)
|
||||
|
||||
# If you need more cameras, just add more launch_include here, and change the usb_port and device_num
|
||||
# If you need more cameras, just add more launch_include here and change the usb_port
|
||||
|
||||
# Launch description
|
||||
ld = LaunchDescription([
|
||||
|
||||
@@ -27,13 +27,11 @@ ros2 run orbbec_camera list_devices_node
|
||||
|
||||
3. 将 `usb_port` 设置为 `2-2`,表示正在使用端口 `2-2` 上的相机设备。此值可以在 `ros2 run orbbec_camera list_devices_node` 命令的输出中找到。
|
||||
|
||||
4. 将 `device_num` 设置为 `2`,表示将使用两个相机。
|
||||
4. 将 `sync_mode` 设置为 `primary`,表示 `2-7` 相机设备处于主模式。多相机同步模式选项可以在下图中找到。
|
||||
|
||||
5. 将 `sync_mode` 设置为 `primary`,表示 `2-7` 相机设备处于主模式。多相机同步模式选项可以在下图中找到。
|
||||
5. 来自 `config_file_path` 的参数可以覆盖在 `gemini_330_series.launch.py` 中设置的参数(可选)。
|
||||
|
||||
6. 来自 `config_file_path` 的参数可以覆盖在 `gemini_330_series.launch.py` 中设置的参数(可选)。
|
||||
|
||||
7. 对于从属相机,将 `trigger_out_enabled` 设置为 false。
|
||||
6. 对于从属相机,将 `trigger_out_enabled` 设置为 false。
|
||||
|
||||
| **模式名称** | **设置效果说明** |
|
||||
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
||||
+5
-11
@@ -2,21 +2,19 @@
|
||||
|
||||
文件路径:[image_sync_example_node.cpp](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/multi_camera_time_sync/image_sync_example_node.cpp)
|
||||
|
||||
此示例节点用于 **4 台 Orbbec 相机** 的同步采集与时间戳验证。
|
||||
它可用于验证多相机主从同步(Primary / Secondary Synced)模式下的帧对齐精度。
|
||||
此示例节点用于多台 Orbbec 相机的同步采集与时间戳验证,支持同时验证 **1~8 路图像 topic**。
|
||||
节点启动时会自动发现已发布的 color/depth 图像 topic,可用于验证多相机主从同步(Primary / Secondary Synced)模式下的帧对齐精度。
|
||||
|
||||
## 使用教程
|
||||
|
||||
### **在 `multi_camera_synced.launch.py` 的基础上做以下修改**
|
||||
|
||||
- 增加 `launch_include` 以适配 4 台相机
|
||||
- 根据参与同步的相机数量调整 `launch_include`
|
||||
|
||||
- 根据设备型号选择对应的 launch 文件,如 330 系列选择 gemini_330_series.launch.py
|
||||
|
||||
- 命名规范:camera_name 命名方式 camera_01、camera_02、camera_03 ...
|
||||
|
||||
- 设置 device_num 数量为 4
|
||||
|
||||
- USB 端口配置 usb_port,使用以下命令查看并绑定正确的端口
|
||||
`ros2 run orbbec_camera list_devices_node`
|
||||
|
||||
@@ -46,11 +44,11 @@
|
||||
- 启动多机同步 launch: `multi_camera_synced.launch.py`
|
||||
|
||||
- 打开新终端运行同步验证节点: `ros2 run orbbec_camera image_sync_example_node`
|
||||
该节点会输出多相机图像的时间戳差异信息,用于验证同步效果。
|
||||
该节点会自动发现已启动相机的 color/depth 图像 topic,显示同步图像,并输出时间戳差异和 FPS 统计,用于验证同步效果。
|
||||
|
||||
---
|
||||
|
||||
### **参考 launch 文件**
|
||||
### **4 台相机参考 launch 文件**
|
||||
|
||||
```
|
||||
import os
|
||||
@@ -78,7 +76,6 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
"camera_name": "camera_01",
|
||||
"usb_port": "2-2.3",
|
||||
"device_num": "4",
|
||||
"sync_mode": "primary",
|
||||
"config_file_path": config_file_path,
|
||||
"trigger_out_enabled": "true"
|
||||
@@ -92,7 +89,6 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
"camera_name": "camera_02",
|
||||
"usb_port": "2-1",
|
||||
"device_num": "4",
|
||||
"sync_mode": "secondary_synced",
|
||||
"config_file_path": secondary_config_file_path,
|
||||
"trigger_out_enabled": "false"
|
||||
@@ -106,7 +102,6 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
"camera_name": "camera_03",
|
||||
"usb_port": "2-3",
|
||||
"device_num": "4",
|
||||
"sync_mode": "secondary_synced",
|
||||
"config_file_path": secondary_config_file_path,
|
||||
"trigger_out_enabled": "false"
|
||||
@@ -120,7 +115,6 @@ def generate_launch_description():
|
||||
launch_arguments={
|
||||
"camera_name": "camera_04",
|
||||
"usb_port": "2-4",
|
||||
"device_num": "4",
|
||||
"sync_mode": "secondary_synced",
|
||||
"config_file_path": secondary_config_file_path,
|
||||
"trigger_out_enabled": "false"
|
||||
|
||||
Reference in New Issue
Block a user