mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-08 22:07:46 +08:00
docs: update example links and descriptions for net and GMSL multi-camera configurations
This commit is contained in:
@@ -38,7 +38,7 @@ ros2 launch orbbec_camera femto_mega.launch.py enumerate_net_device:=false net_d
|
||||
|
||||
**Multi Net camera**
|
||||
|
||||
For [multi_net_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/net_camera/multi_net_camera.launch.py) as an example:
|
||||
For [multi_net_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/multi_net_camera/multi_net_camera.launch.py) as an example:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_net_camera.launch.py
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# GMSL_camera
|
||||
# GMSL Multi-Camera Synchronization
|
||||
|
||||
> This section describes how to use GMSL cameras in OrbbecSDK_ROS2.
|
||||
> This section describes how to synchronize multiple GMSL-connected Gemini 330 Series cameras in OrbbecSDK_ROS2.
|
||||
|
||||
You can find example usage code in the [example](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples).
|
||||
The example is available in [gmsl_multi_camera_sync](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/gmsl_multi_camera_sync).
|
||||
|
||||
## Single GMSL camera
|
||||
## Configure device file permissions
|
||||
|
||||
The usage of GMSL camera in OrbbecSDK_ROS2 is the same as that of Gemini 330 series camera via USB. ROS2 v2.10.1 supports Gemini 335Lg, Gemini 338Lg, Gemini 345Lg, and Gemini 305g.
|
||||
Before starting the cameras, grant access to the camera synchronization device:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera gemini_330_gmsl.launch.py
|
||||
sudo chmod 777 /dev/camsync
|
||||
```
|
||||
|
||||
## Multi GMSL camera
|
||||
## Configure the cameras
|
||||
|
||||
To get the `usb_port` of the GMSL camera, plug in the camera and run the following command in the terminal:
|
||||
|
||||
@@ -20,38 +20,26 @@ To get the `usb_port` of the GMSL camera, plug in the camera and run the followi
|
||||
ros2 run orbbec_camera list_devices_node
|
||||
```
|
||||
|
||||
For example, the obtained gmsl camera `usb_port`: `gmsl2-1`
|
||||
For example, a reported GMSL camera `usb_port` may be `gmsl2-1`.
|
||||
|
||||
Go to the [multi_gmsl_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera.launch.py) file and change the `usb_port`.
|
||||
Update the `usb_port` values in [multi_gmsl_camera_synced.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_multi_camera_sync/multi_gmsl_camera_synced.launch.py) to match the GMSL links reported by your system. The example uses the standard `gemini_330_series.launch.py` for both cameras.
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_gmsl_camera.launch.py
|
||||
```
|
||||
## Synchronization setup
|
||||
|
||||
> Note: By default, multi_gmsl_camera.launch.py only starts color and depth. If you want to start other sensors, please go to [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml) to modify them.
|
||||
|
||||
Use `gemini_330_gmsl.launch.py` for Gemini 335Lg / 338Lg, `gemini_301_series.launch.py` for Gemini 305g, and `gemini345_lg.launch.py` for Gemini 345Lg when composing a multi-camera launch.
|
||||
|
||||
## Multi GMSL camera synced
|
||||
|
||||
First, please see how to use [multi_camera_synced](./multi_camera_synced.md).
|
||||
|
||||
In addition, GMSL multi-camera synced does not require Multi-Camera Sync Hub Pro, so there is no need to set the `primary` mode. Each GMSL camera is `secondary`.
|
||||
GMSL multi-camera synchronization does not require Multi-Camera Sync Hub Pro. Both cameras use `secondary_synced` mode. The receiving camera starts first; the camera that enables the host-side GMSL trigger starts two seconds later.
|
||||
|
||||
**Additional Parameter Settings**
|
||||
|
||||
* `gmsl_trigger_fps` : set hardware soc trigger source frame rate.
|
||||
* `enable_gmsl_trigger` : enable hardware soc trigger.
|
||||
* `gmsl_trigger_fps`: Sets the hardware SoC trigger source frame rate.
|
||||
* `enable_gmsl_trigger`: Enables the hardware SoC trigger. Enable it on only one camera in the group.
|
||||
|
||||
**Run the launch**
|
||||
|
||||
Please refer to the configuration in [multi_gmsl_camera_synced.launch.py.](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera_synced.launch.py)
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_gmsl_camera_synced.launch.py
|
||||
```
|
||||
|
||||
> Note: By default, multi_gmsl_camera_synced.launch.py only starts color and depth. If you want to start other sensors, please go to [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml) and [camera_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_params.yaml) to modify them.
|
||||
> Note: Both cameras load [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml), which enables color and depth by default. Modify that file to configure other streams.
|
||||
|
||||
## Usage Limitations of GMSL Cameras
|
||||
|
||||
|
||||
+15
-1
@@ -26,7 +26,21 @@ Further details on efficient intra-process communication can be found [here](htt
|
||||
|
||||
Load other component nodes (consumers of the wrapper topics) in the same way.
|
||||
|
||||
**Using a launch file**
|
||||
**Using the shared multi-camera container example**
|
||||
|
||||
The [multi_camera_shared_container](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_shared_container) example creates one multithreaded component container and loads two Gemini 330 Series camera components into it. Update the two `usb_port` values in `multi_camera_shared_container.launch.py`, then run:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_camera_shared_container.launch.py
|
||||
```
|
||||
|
||||
The example passes the following arguments to both camera includes:
|
||||
|
||||
* `attach_to_shared_component_container=true`: Loads the camera component into an existing container instead of creating another container.
|
||||
* `component_container_name=shared_orbbec_container`: Selects the target container. The value must match the name of the container created by the parent launch file.
|
||||
* `use_intra_process_comms=true`: Enables intra-process communication for the camera component.
|
||||
|
||||
**Using the single-camera intra-process demonstration launch**
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera gemini_intra_process_demo_launch.py
|
||||
|
||||
@@ -38,7 +38,7 @@ ros2 launch orbbec_camera femto_mega.launch.py enumerate_net_device:=false net_d
|
||||
|
||||
**多个网络相机**
|
||||
|
||||
以 [multi_net_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/net_camera/multi_net_camera.launch.py) 为例:
|
||||
以 [multi_net_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/multi_net_camera/multi_net_camera.launch.py) 为例:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_net_camera.launch.py
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
# GMSL 相机
|
||||
# GMSL 多相机同步
|
||||
|
||||
> 本节介绍如何在 OrbbecSDK_ROS2 中使用 GMSL 相机。
|
||||
> 本节介绍如何在 OrbbecSDK_ROS2 中同步多台通过 GMSL 连接的 Gemini 330 系列相机。
|
||||
|
||||
您可以在 [example](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples) 中找到示例使用代码。
|
||||
示例代码位于 [gmsl_multi_camera_sync](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/gmsl_multi_camera_sync)。
|
||||
|
||||
## 单个 GMSL 相机
|
||||
## 配置设备文件权限
|
||||
|
||||
GMSL 相机在 OrbbecSDK_ROS2 中的使用与通过 USB 的 Gemini 330 系列相机相同。ROS2 v2.10.1 支持 Gemini 335Lg、Gemini 338Lg、Gemini 345Lg 和 Gemini 305g。
|
||||
启动相机前,先为相机同步设备授予访问权限:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera gemini_330_gmsl.launch.py
|
||||
sudo chmod 777 /dev/camsync
|
||||
```
|
||||
|
||||
## 多个 GMSL 相机
|
||||
## 配置相机
|
||||
|
||||
要获取 GMSL 相机的 `usb_port`,插入相机并在终端中运行以下命令:
|
||||
|
||||
@@ -20,38 +20,26 @@ ros2 launch orbbec_camera gemini_330_gmsl.launch.py
|
||||
ros2 run orbbec_camera list_devices_node
|
||||
```
|
||||
|
||||
例如,获得的 gmsl 相机 `usb_port`:`gmsl2-1`
|
||||
例如,系统报告的 GMSL 相机 `usb_port` 可能为 `gmsl2-1`。
|
||||
|
||||
转到 [multi_gmsl_camera.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera.launch.py) 文件并更改 `usb_port`。
|
||||
根据系统报告的 GMSL 链路,修改 [multi_gmsl_camera_synced.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_multi_camera_sync/multi_gmsl_camera_synced.launch.py) 中的 `usb_port`。该示例为两台相机复用标准的 `gemini_330_series.launch.py`。
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_gmsl_camera.launch.py
|
||||
```
|
||||
## 同步配置
|
||||
|
||||
> 注意:默认情况下,multi_gmsl_camera.launch.py 仅启动 color 和 depth。如果您想启动其他传感器,请转到 [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml) 进行修改。
|
||||
|
||||
组合多相机启动时,Gemini 335Lg / 338Lg 使用 `gemini_330_gmsl.launch.py`,Gemini 305g 使用 `gemini_301_series.launch.py`,Gemini 345Lg 使用 `gemini345_lg.launch.py`。
|
||||
|
||||
## 多个 GMSL 相机同步
|
||||
|
||||
首先,请查看如何使用 [multi_camera_synced](./multi_camera_synced.md)。
|
||||
|
||||
此外,GMSL 多相机同步不需要 Multi-Camera Sync Hub Pro,因此无需设置 `primary` 模式。每个 GMSL 相机都是 `secondary`。
|
||||
GMSL 多相机同步不需要 Multi-Camera Sync Hub Pro。两台相机均使用 `secondary_synced` 模式。接收触发信号的相机先启动,启用主机端 GMSL 触发的相机在两秒后启动。
|
||||
|
||||
**额外的参数设置**
|
||||
|
||||
* `gmsl_trigger_fps`:设置硬件 soc 触发源帧率。
|
||||
* `enable_gmsl_trigger`:启用硬件 soc 触发。
|
||||
* `gmsl_trigger_fps`:设置硬件 SoC 触发源帧率。
|
||||
* `enable_gmsl_trigger`:启用硬件 SoC 触发,同一组相机中仅在一台相机上启用。
|
||||
|
||||
**运行启动文件**
|
||||
|
||||
请参考 [multi_gmsl_camera_synced.launch.py](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/examples/gmsl_camera/multi_gmsl_camera_synced.launch.py) 中的配置。
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_gmsl_camera_synced.launch.py
|
||||
```
|
||||
|
||||
> 注意:默认情况下,multi_gmsl_camera_synced.launch.py 仅启动 color 和 depth。如果您想启动其他传感器,请转到 [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml) 进行修改。
|
||||
> 注意:两台相机均加载 [camera_secondary_params.yaml](https://github.com/orbbec/OrbbecSDK_ROS2/blob/v2-main/orbbec_camera/config/camera_secondary_params.yaml),默认启用 color 和 depth。如需配置其他数据流,请修改该文件。
|
||||
|
||||
## GMSL 相机的使用限制
|
||||
|
||||
|
||||
+15
-1
@@ -26,7 +26,21 @@
|
||||
|
||||
以相同方式加载其他组件节点(封装器话题的消费者)。
|
||||
|
||||
**使用启动文件**
|
||||
**使用多相机共享容器示例**
|
||||
|
||||
[multi_camera_shared_container](https://github.com/orbbec/OrbbecSDK_ROS2/tree/v2-main/orbbec_camera/examples/multi_camera_shared_container) 示例创建一个多线程组件容器,并将两个 Gemini 330 系列相机组件加载到该容器中。修改 `multi_camera_shared_container.launch.py` 中两台相机的 `usb_port` 后,运行:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_camera_shared_container.launch.py
|
||||
```
|
||||
|
||||
该示例向两个相机 include 传递以下参数:
|
||||
|
||||
* `attach_to_shared_component_container=true`:将相机组件加载到已有容器中,而不是新建容器。
|
||||
* `component_container_name=shared_orbbec_container`:指定目标容器,其值必须与父 launch 文件创建的容器名称一致。
|
||||
* `use_intra_process_comms=true`:为相机组件启用进程内通信。
|
||||
|
||||
**使用单相机进程内通信演示 launch**
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera gemini_intra_process_demo_launch.py
|
||||
|
||||
Reference in New Issue
Block a user