Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hw synchronization of several realsense using a synchonization cable #3102

Conversation

fortizcuesta
Copy link
Contributor

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'"

@Arun-Prasad-V
Copy link
Contributor

Hi @fortizcuesta, thanks for the contribution.

I didn't check the PR fully. But, one quick comment. There is already a param in ROS2 wrapper for enabling the inter cam sync feature. If you run the command ros2 param list, you can see the param depth_module.inter_cam_sync_mode. Only step required is to expose it in rs_launch.py.

Could you please try this way and let us know your observations?

cc: @SamerKhshiboun

@fortizcuesta
Copy link
Contributor Author

Hi @Arun-Prasad-V,
thank you, I did not know that there is allready a param for taht. I checked that the param depth_module.inter_cam_sync_mode work as expected, therefore i update the pr reverting the changes and update the rs_launch.py to expose it, so that it is more easy to be used.

@SamerKhshiboun
Copy link
Collaborator

@fortizcuesta Thanks for contribution ! Great work.

@SamerKhshiboun SamerKhshiboun merged commit 047d601 into IntelRealSense:ros2-development May 29, 2024
7 checks passed
@SamerKhshiboun SamerKhshiboun removed their request for review May 29, 2024 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants