stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

If there any way to obtain the real time-stamp when the image was shot #798

Closed JunbaoWan closed 2 years ago

JunbaoWan commented 2 years ago

Preliminary Checks

Description

Device ZED2 SDK version:3.5 Platform:nvidia jetson+ros melodic What'the issue: We want to obtain the real time-stamp when the image was shot

Steps to Reproduce

The same issue as :+1: https://github.com/stereolabs/zed-ros-wrapper/issues/369 any update? We use the follow code to get timestamp,as you know, it is grab time. Is there any way to get the real time-stamp when the image was shot? Code: mZed.retrieveImage(mat_left, sl::VIEW::LEFT, sl::MEM::CPU, mMatResolVideo); grab_ts = mat_left.timestamp; ros::Time stamp_left_raw = sl_tools::slTime2Ros(grab_ts);

Expected Result

Get the real time-stamp when the image was shot It is urgent to us,wish your reply,thanks

Actual Result

Can only get grab time

ZED Camera model

ZED2

Environment

OS:ubuntu 18.04
Arch:ARM
GPU:Nvidia jetson xavier AGX
Other info:ROS melodic

Anything else?

No response

Myzhar commented 2 years ago

Hi @JunbaoWan that's not the GRAB time, but the time of arrival of the frame in the USB3 buffer, hence that's the nearest time to the real acquisition. The latency is about 2-3 frames because of the UVC driver buffering behavior that is not controllable.

hriihimaki commented 2 years ago

Is there any update or fix (expected) to this issue?

Myzhar commented 2 years ago

There will not be a fix. This is the expected behavior of the ZED SDK. It's not possible to know the exact moment when the frame has been grabbed, but only the time at which the frame has been received by the USB controller. You can create a statistic of the latency of the camera by grabbing images of the screen that displays a running timer.