5.2.4. GMSL Multi-Camera Synchronization
This section describes how to synchronize multiple GMSL-connected Gemini 330 Series cameras in OrbbecSDK_ROS2.
The example is available in gmsl_multi_camera_sync.
5.2.4.1. Configure device file permissions
Before starting the cameras, grant access to the camera synchronization device:
sudo chmod 777 /dev/camsync
5.2.4.2. Configure the cameras
To get the usb_port of the GMSL camera, plug in the camera and run the following command in the terminal:
ros2 run orbbec_camera list_devices_node
For example, a reported GMSL camera usb_port may be gmsl2-1.
Update the usb_port values in 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.
5.2.4.3. Synchronization setup
GMSL multi-camera synchronization does not require Multi-Camera Sync Hub Pro. In the current example, both cameras use secondary_synced mode. The receiving camera starts first; the camera that enables the host-side GMSL trigger starts two seconds later.
5.2.4.3.1. GMSL Link Triggering Modes
The current example uses a host-side SoC PWM trigger source over the GMSL link. The two triggering modes below are available; the exact availability depends on the camera model, firmware, and SDK version. In one camera group, set enable_gmsl_trigger to true on only one camera; the other cameras receive the same trigger signal.
| Mode | Configuration and behavior |
|---|---|
secondary_synced |
Set all cameras to secondary_synced. Cameras start capturing as soon as the streams start and adjust the capture timing according to the PWM trigger signal; they continue capturing if the trigger signal stops. The PWM trigger frequency should match the stream frame rate. This is the mode used by the current example. |
hardware_triggering |
Set all cameras to hardware_triggering. Cameras capture images only after receiving a PWM hardware trigger signal; the number of frames captured per trigger is set by frames_per_trigger. For the GMSL link, the PWM trigger frequency should not exceed half of the stream frame rate; for example, it should not exceed 15 FPS when the stream runs at 30 FPS. |
Note: When synchronizing GMSL cameras through the 8-pin synchronization interface, the supported synchronization modes are the same as for USB cameras. See Multi-Camera Synchronization. The
gmsl_trigger_fpsparameter and/dev/camsyncin this section apply to GMSL link triggering.
Additional Parameter Settings
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
ros2 launch orbbec_camera multi_gmsl_camera_synced.launch.py
Note: Both cameras load camera_secondary_params.yaml, which enables color and depth by default. Modify that file to configure other streams.
5.2.4.4. Usage Limitations of GMSL Cameras
GMSL cameras interface with various deserializer chips such as MAX9296 and MAX92716. Orbbec GMSL cameras support multiple streams including depth, color, IR, and IMU data, but certain usage limitations apply:
GMSL only supports V4L2 and YUYV format; MJPG format is not supported. RGB output is derived from YUYV format conversion.
Metadata for Gemini-335Lg is provided via a separate node, while metadata for other models is embedded within video frames, which remains transparent to users.
When using the Max96712 as a deserializer chip, due to the characteristics of the Max96712 chip, a multi - machine synchronous trigger signal must be provided in the secondary_synced mode. Otherwise, data flow interruption will occur when switching the data stream
Two cameras connected on the same MAX9296, MAX96712 LinkA/B, or MAX96712 LinkC/D have the following limitations:
Before driver version v1.2.02, there was a restriction that the RGB of one camera and the right IR of another camera could not stream simultaneously. After driver version v1.2.02, the restriction was modified to that the RGB of one camera and the left IR of another camera cannot stream simultaneously.
Before driver version v1.2.02, there was a restriction that the DEPTH of one camera and the left IR of another camera could not stream simultaneously. After driver version v1.2.02, the restriction was modified to that the DEPTH of one camera and the right IR of another camera cannot stream simultaneously.
The combined maximum number of active streams from both cameras is limited to four (satisfying the above two conditions ensures compliance).
For further known limitations, please refer to Usage Limitations of Orbbec GMSL Cameras