Time stamp when outputting processing information

asked 2022-03-08 01:12:33 -0500

kankanzheli gravatar image

updated 2022-03-08 01:32:31 -0500

gvdhoorn gravatar image

Hello everyone. I use this code to transform the image msg into the numpy array bgr8.

......
def rgb_callback(rgbdata):  
    global image_np_global  
    #rospy.loginfo("receiving video frame")
    image_np_global = bridge.imgmsg_to_cv2(rgbdata, "bgr8")
......
rospy.Subscriber('/zedm/zed_node/left/image_rect_color', Image, rgb_callback)
......

How can I get the time stamp of each picture result I get? The time should be accurate to milliseconds.

edit retag flag offensive close merge delete