Ensure that the image corresponds to the point cloud data
I am using this code to accept pointcloud and rgb data from a camera in gazebo.
This camera is the kinect camera.
rospy.Subscriber('/zedmini/color/image_raw', Image, rgb_callback)
rospy.Subscriber('/zedmini/depth/points', PointCloud2, points_callback)
How can I ensure that the point cloud data and RGB data of each frame image obtained here are corresponding? At the same time, I want to output the timestamp when I get each frame of image data.
What should I do?