Allow hw synchronization of several realsense using a synchonization cable #3102
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration, two devices will stream synchronously, if they are connected with a sync cable and one of them is set up to operate as master and the other as slave. This pr allows the ros2 wrapper to use this feature of the realsense library. It introduces a launch parameter named inter_cam_sync_mode with the default value "0" ( devices will by default stream asynchronously), which can be used to set up the devices to operate as Master or Slave. The parameter will be used to set up the realsense RS2_OPTION_INTER_CAM_SYNC_MODE. A launch file rs_multi_camera_launch_sync.py with a description is also included to be launched with the following command :
ros2 launch realsense2_camera rs_multi_camera_launch_sync.py camera_name1:=cam_1 camera_name2:=cam_2 camera_namespace1:=camera camera_namespace2:=camera serial_no1:="'YourSerialNb1'" serial_no2:="''YourSerialNb2'"