Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where does the timestamp of the published camera topic data come from? #2963

Closed
tuzbtla opened this issue Jan 4, 2024 · 4 comments
Closed
Labels

Comments

@tuzbtla
Copy link

tuzbtla commented Jan 4, 2024

Where does the timestamp of published camera topic data (including depth images and rgb images) come from?

  1. Inside the camera
  2. The moment the data is received, like ros::Time::now()

Which one is right, or is it from somewhere else?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jan 4, 2024

Hi @tuzbtla There are a range of different timestamps that have different characteristics. At IntelRealSense/librealsense#2188 (comment) an Intel RealSense team member provides a list of timestamp types and descriptions for them.

If the librealsense SDK has support for hardware metadata enabled then hardware timestamps will be provided. Otherwise, software timestamps based on the computer's clock will be used.

Hardware metadata support is enabled if: (1) the librealsense SDK is installed from DKMS packages; or (2) if librealsense is built from source code and a kernel patch has been applied to the Linux kernel; or (3) librealsense has been built from source code with the CMake flag -DFORCE_RSUSB_BACKEND=TRUE included in the CMake build instruction.

@tuzbtla
Copy link
Author

tuzbtla commented Jan 4, 2024

嗨,有一系列不同的时间戳具有不同的特征。在英特尔实感/librealsense#2188(注释)中,英特尔实感团队成员提供了时间戳类型列表及其描述。

如果 librealsense SDK 启用了对硬件元数据的支持,则将提供硬件时间戳。否则,将使用基于计算机时钟的软件时间戳

在以下情况下,将启用硬件元数据支持:(1) 从 DKMS 软件包安装 librealsense SDK;或 (2) 如果 librealsense 是从源代码构建的,并且内核补丁已应用于 Linux 内核;或 (3) librealsense 是从源代码构建的,CMake 构建指令中包含 CMake 标志 -DFORCE_RSUSB_BACKEND=TRUE

Thanks, because I want to synchronize Time with other sensors, how do I turn off support for hardware metadata and use the time returned by ros::Time::now() instead?

@MartyG-RealSense
Copy link
Collaborator

If you disable a setting called Global Time which is enabled by default on RealSense 400 Series cameras then ROS will use its own timing sync system. More information about this can be found at #1906 (comment)

@tuzbtla
Copy link
Author

tuzbtla commented Jan 4, 2024

Thanks.

@tuzbtla tuzbtla closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants