IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.6k stars 1.77k forks source link

RGB image and depth image time sync #3169

Closed CYJ00 closed 3 months ago

CYJ00 commented 3 months ago

Required Info
Camera Model D415
Operating System & Version Ubuntu 20.04
Platform Laptop
ROS Distro Noteic

ros-noetic-librealsense2: 2.50.0-1 ros-noetic-realsense2-camera: 2.3.2-1

Issue Description

<Describe your issue / question / feature request / etc..>

If I look at the time stamp of the image captured by the rostopic, the time is not correct. I want the time of the rgb image and the depth image to be the same time, but how can I do that?

MartyG-RealSense commented 3 months ago

Hi @CYJ00 Do you get the results that you require if you add enable_sync:=true to your roslaunch instruction, please? enable_sync: gathers the closest frames of different sensors, such as infrared, color and depth, to be sent with the same timetag.

MartyG-RealSense commented 3 months ago

Hi @CYJ00 Do you require further assistance with this case, please? Thanks!

CYJ00 commented 3 months ago

Hello! I tried roslauch rs_camera.lanch enable_sync:=true The time time stamps of /camera/color/image_raw topic and /camera/depth/image_rect_raw topic are not same, but the error is acceptable. Thank you!

MartyG-RealSense commented 3 months ago

You are very welcome, @CYJ00 - I'm pleased that I could help. Thanks very much for the update!