Robotics StackExchange | Archived questions

Time stamp when outputting processing information

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.

Asked by kankanzheli on 2022-03-08 02:12:33 UTC

Comments

Answers