Search code examples
google-project-tango

How to get current timestamp Tango SDK


All events in the C++ Tango SDK comes with a timestamp. Is there any way we can ask for the current timestamp ? I've tried to use the monotonic clock of the OS but there is an offset and I don't know how to get the current time in the same reference as the Tango events.


Solution

  • The Project Tango tablet uses a different timestamp channel other than the system time to ensure the timestamp correctness. There's no method to query a Tango timestamp at arbitrary frame..

    If you want to do data sync up, you could probably look into the answer to this question.

    If you want to get the Tango timestamp at the current frame, you could use TangoService_getPoseAtTime and set the timestamp to 0, it will basically return you the latest pose of the system's estimate, the timestamp in that pose would be the latest timestamp. Also, to get fastest estimation, you could also turn on the config_enable_low_latency_imu_integration in the configuration.