-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
How to sync rostopic time stamps among multiple devices? #1451
Comments
Hi @haoyuanz13 It sounds as though you need to hardware sync the two cameras, so that one of the cameras (a "slave") follows the timing of another camera (the "master"). In the RealSense ROS wrapper, hardware sync can be accessed with the inter_cam_sync_mode option to set one camera as Master ('1') and the other camera as Slave ('2'). The subject was discussed on the RealSense ROS GitHub this week: You can read much more about hardware sync between cameras in Intel's multiple camera sync white-paper document: https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration |
Good to know that, but still cannot figure out how to use this option via launch file ... is there any more demos running like, roslaunch realsense2_camera rs_xxxxx.launch xxxx
|
Using hardware sync between cameras relies on creating a sync cable and joining the two cameras together. There are a set of hardware sync pins concealed under a cover with a small hole on the top of the camera's casing. The electronics diagram for creating a sync cable is in the multiple camera white-paper document. It is also possible to sync cameras wirelessly by transmitting a trigger pulse from a signal generator. This is also described in the paper. |
I believe the answer he want is: is there any way to set that parameter through launch file? That's also my question. Launching the dynamic config to tune the parameter of every camera every time after launching the camera is a stupid thing to do :( |
@Andyshen555 The subject of a launch file rosparam equivalent for inter_cam_sync_mode was discussed in a link from one of the pages that was linked to in this discussion. So 2 links away. :) Please try the rosparam below and change '1' to the mode number that you want to set (0 for non-synced default, 1 for ,master, 2 for slave).
|
Hi @haoyuanz13 Do you require further assistance with this case, please? Thanks! |
Yes for sure, I have tried to add rosparam in the launch file, still not work correctly. Btw, could u pls provide one specific launch file with the |
I researched your question carefully but could not find a pre-made launch file that features the inter_cam_sync_mode flag. |
Alright... so how can we make it work through this magic param? |
Use of a rosparam in a launch file to define the inter_cam_sync_mode setting is referenced in a comment earlier in this discussion: I have not seen inter_cam_sync_mode be set in the roslaunch launch instruction before (instead of putting it inside the roslaunch file as a rosparam). If it were possible, I would expect the flag to add to the end of the roslaunch instruction to be in a format that was something like this: inter_cam_sync_mode:=2 Again, change the number to the mode that you want to set (default, master, slave). You would still have to have a method of triggering the camera sync though, whether a physical sync cable between the cameras or a wireless pulse. |
alright, that makes sense somehow ... |
Hi @haoyuanz13 Do you still rquire assistance with this case, please? Thanks! |
Maybe sometime in the future, but I will close this issue now. |
Thanks very much for the update @haoyuanz13 |
Here I have two d435 cams and launch them one by one, is there any approach to launch two d435 cams and their topics, e.g. depth image, has the exact same time stamp?
The text was updated successfully, but these errors were encountered: