L515 inconsistent frame counts with external trigger
This post is a follow up on my question about the external trigger on the L515 found here.
To test the external trigger of the L515 I've connected it to a 3.3V Arduino and made a program that triggers the camera every 1 second for 120ms (this was the lowest number that would actually give me frames). I've filmed the camera next to the realsense viewer software so you can see the frames I'm getting and also the light pulse from the realsense. I've counted the light pulses and compared them with the frame numbers, you can find the video I made with the counting of the trigger pulses and frames here (this video should explain what I mean).
In my video you can clearly see that:
- The frame numbers are inconsistent
- About half of the time or more I'm not getting a frame, and then after a while I get 1 frame but the frame number increased with more than 1.
If the camera would start taking frames exactly after 60ms and the frame time is always exactly the same, then how can the frame numbers start to drift? Every triggering should be exactly the same and result in exactly the same increase in frame count. Also why won't the camera give me frames if my trigger time is below 120ms?
I get the idea that there might be some kind of frame loop that is always running and if the trigger signal is high at the beginning of this loop then the frame is taken, otherwise the next time the trigger signal is checked will be 33ms later. Then it depends when in this cycle I give the trigger signal and it would sort of explain the results I'm getting.
I hope you can clarify this behavior or maybe tell me if I'm doing something wrong.
With kind regards,
Tom
-
Hello T Loomans,
When the sync signal is low and the device is in slave mode, the only features that are turned off are the laser and the pipe (USB transfer) to the host computer. The depth can continue to stream in this case but it's pretty much throw away data since the laser is turned off.
When the sync signal is high, there is a 60ms setup time to turn on the laser and turn on the pipe before good depth from that camera is realized.
Pulse width = 60ms(setup) + #of frames33ms
For example: for capturing 3 consecutive frames Ton needs to be high for 160msSo setup time is about 2 frames (60ms ~= 2*33ms) before a good frame is available.
It will depend on where in the cycle the sync signal is high. You may go high with the sync signal when a frame is already in the middle of its presentation.
Sincerely,
Jesus G.
Intel Customer Support -
Dear Jesus,
Thank you for the fast response. However, the conclusion is rather disappointing. Now that you've explained how it works, the answer to my previous support question is actually incorrect (I asked if the setup time was exactly 60.000ms and if the capture starts immediately after this setup time). Also the information in the whitepaper is incorrect (or at least incomplete). Could this be updated so the others might benefit from this information? It would have spared me a lot of time setting up experiments to confirm this behavior if this information was in the whitepaper.
Now that we now that the external trigger can fall in the middle of a cycle resulting in unpredictable delays till the frame is transferred, what is the use of this external trigger port? Because I don't think it can be used to synchronize cameras since they won't be running in exactly the same cycle.
In my setup I want to synchronize the frames of the camera with a conveyor belt with rotary encoder. Not knowing how long after the trigger the frame is taken makes this very difficult. One solution might be if the camera could send the exact timestamp of the last time that the trigger had a rising edge with the frame metadata. Then I could check the difference between the trigger time and the frame time so I know how long its setup time took and compensate for that in the movement of the conveyor. Would it be possible to implement this in the firmware?
With kind regards.
Please sign in to leave a comment.
Comments
3 comments