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.
Asked
Active
Viewed 583 times
1 Answers
1
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.
-
To add to Jason's answer, at the C level timestamp information is returned as a double for pose. picture, and point respectively - there's various logic to try and bind at least two temporal streams,as @JasonGuo points out in various posts. The three streams have to be perceived as providing independent monotonically increasing timestamps given ommissions in the functionality at this point - the real question is 'zacly what is a double time stamp anyway, and what is the fractional component' - Me, I'm hoping for fractional == millis, but I'm still too busy trying to ship the data – Mark Mullin Jan 22 '15 at 03:46
-
"There's no method to query a Tango timestamp at arbitrary frame." Do you think it would be possible to add this to a future version of the Tango API ? – Jean-Philippe Jodoin Jan 22 '15 at 13:14
-
@Jean-PhilippeJodoin I am not sure about that, what is your use case for that. For now, you could retrieve the most recent timestamp use getPoseAtTime(). Take a look of [this post](http://stackoverflow.com/questions/28070864/exactly-how-do-we-compute-timestamp-differentials) – xuguo Jan 23 '15 at 19:01
-
@JasonGuo well basically, our software already use some timestamp to handle events and I want to sync the Tango events with our system so I need to have the Tango time as accurately as possible in order to calculate the offset between our reference and yours. If I call getPoseAtTime with 0, I guess I will have the time of the last pose which might be (at 60Hz) 0.016 second lagging. I would like to be able to fetch the time directly without overhead. – Jean-Philippe Jodoin Jan 24 '15 at 01:41