Get_timestamp method ZED SDK 5.0.2

Hey all,

I had a question regarding the get_timestamp method. I have a program, where we use the get_timestamp method as get_timestamp(self, reference). Before using the get_timestamp(self, reference) there is a call to the read() and grab() function sequentially leading to get_timestamp(self, reference). Would the timestamp output of the method give out the timestamp of when the read() method was called or when the grab method was called?

Hi @pratyush
get_timestamp can be used in two different ways according to the value of the reference parameter:

  • TIME_REFERENCE.IMAGE → returns the timestamp of the latest images grabbed. That’s the timestamp assigned to data when they are received in the memory buffer when grab is called.
  • TIME_REFERENCE.CURRENT → returns the current OS timestamp in UNIX format, nanoseconds units.

Note: TIME_REFERENCE.IMAGE is the timestamp assigned to each data generated by the ZED SDK pipeline: depth, point cloud, objects, bodies, etc.

Only sensor data has a different timestamp assigned by the SDK when each data sample is received with a frequency different from the grab frequency.