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

camera realsense D435 &ublox time synchronization #12028

Closed
Mahmoudadham4040 opened this issue Jul 24, 2023 · 5 comments
Closed

camera realsense D435 &ublox time synchronization #12028

Mahmoudadham4040 opened this issue Jul 24, 2023 · 5 comments

Comments

@Mahmoudadham4040
Copy link

Required Info
Camera Model realsense D435
Operating System & Version Ubuntu 18
Platform PC/Raspberry

Issue Description

Could you please inform me if the real sense D435 camera can be synchronized (hardware-based camera pins) with GPS receivers (i.e. Ublox)?
(I asked about other devices such as GPS, lidar, and imu, not multi-cameras synchronization).

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jul 24, 2023

Hi @Mahmoudadham4040 You can configure the D435 camera to output a trigger pulse from pin 5 (the Sync pin) of its GPIO sync pin set, which can be found under a small removable cap on the top of the camera casing.

#8171 has an example of C++ code for setting the RealSense SDK option RS2_OPTION_OUTPUT_TRIGGER_ENABLED to '1' to enable the trigger pulse.

if (depth_sensor.supports(RS2_OPTION_OUTPUT_TRIGGER_ENABLED))
 {
     std::cout<<"here";
     depth_sensor.set_option(RS2_OPTION_OUTPUT_TRIGGER_ENABLED, 1.f); // Enable trigger
 }

The trigger pulse can also be activated in the RealSense Viewer tool by enabling the Output Trigger Enabled option which can be found in the Viewer's options side-panel under the 'Stereo Module > Controls' section.

image

You could conceivably run a wire from Pin 5 on the camera's sync pin set to a pin on the non-camera device so that the trigger pulse that is output from the camera travels outwards from the camera to your external device.

image

If your external device can output a trigger signal then it is also possible to configure it the reverse way - to have the external device act as the 'master' and transmit a trigger through a wire to Pin 5 on the camera when it is configured as a 'slave' that will attempt to follow the timing of the external device's trigger pulse.

The trigger pulse should be 1.8 volts in order to be compatible with the camera, so if the external device does not output a trigger at that voltage then you could put a level shifter / voltage shifter component in the circuit to alter the voltage to 1.8 v. RealSense users have used a level shifter similar to the one at the link below.

https://www.sparkfun.com/products/12009

@Mahmoudadham4040
Copy link
Author

Mahmoudadham4040 commented Jul 26, 2023

Thanks for your response, i did all you stated but i want to check if the synchronization between the ublox and realsense is success or not . Is there any way to check?

@MartyG-RealSense
Copy link
Collaborator

The RealSense camera should be configured for hardware sync with the option Inter Cam Sync Mode. This option should be set to '1' if your RealSense camera is acting as master (the generator of the trigger pulse) or set to '2' if it is a slave (receiving a trigger pulse from your ublox).

If your ublox produces a timestamp then comparing that timestamp with the RealSense camera's timestamp could show whether sync is occurring. If the two timestamps remain identical over time then hardware sync is not successful. If the timestamps very slowly drift apart over tens of minutes then sync is successful. This phenemon, which is the opposite of what would be expected, is described at the link below in the section headed Now to the somewhat counter intuitive aspect of time stamps.

https://dev.intelrealsense.com/docs/multiple-depth-cameras-configuration#3-multi-camera-programming

Another method of validating sync is to use a high speed LED panel product.

https://support.intelrealsense.com/hc/en-us/community/posts/360049401673-Multi-sensor-synchronization-validation

@MartyG-RealSense
Copy link
Collaborator

Hi @Mahmoudadham4040 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants