<gh_stars>0
#!/usr/bin/env python

import rospy
import cv2
from sensor_msgs.msg import CameraInfo

rospy.init_node('camers_info', anonymous=True)

pub = rospy.Publisher('/camera_rect/camera_info', CameraInfo, queue_size=10)
rate = rospy.Rate(60)
while not rospy.is_shutdown():
    q=CameraInfo()
    q.header.frame_id='usb_cam'
    q.height=480
    q.width=640

    # message of laptop camera
    
    # q.D=[-0.011564379996107469, -0.13278346529156865, 0.002871276933386434, 0.012271004247334799, 0.0]
    # q.K=[621.3059884025869, 0.0, 356.0044670915155, 0.0, 613.6311250528399, 228.0540546135174, 0.0, 0.0, 1.0]
    # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    # q.P=[607.4340209960938, 0.0, 363.77425307081285, 0.0, 0.0, 611.0780029296875, 228.238811434112, 0.0, 0.0, 0.0, 1.0, 0.0]
   
   
   
    # message of camera1
    # q.D=[-1.9819562520245713, 11.24658065837339, -0.16316165042756223, 0.1440911021230497, 0.0]
    # q.K=[1125.718720866548, 0.0, 315.06250520584933, 0.0, 3060.327452265269, 211.01406054383608, 0.0, 0.0, 1.0]
    # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    # q.P=[1020.1680297851562, 0.0, 359.16432937780337, 0.0, 0.0, 3213.299560546875, 178.4188567831734, 0.0, 0.0, 0.0, 1.0, 0.0]
    
    # message of IR1
    q.D=[0.0, 0.0, 0.0, 0.0, 0.0]
    q.K=[424.0954284667969, 0.0, 423.69146728515625, 0.0, 424.0954284667969, 240.66384887695312, 0.0, 0.0, 1.0]
    q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    q.P=[424.0954284667969, 0.0, 423.69146728515625, 0.0, 0.0, 424.0954284667969, 240.66384887695312, 0.0, 0.0, 0.0, 1.0, 0.0]
    q.binning_x=0
    q.binning_y=0
    q.roi.x_offset=0
    q.roi.y_offset=0
    q.roi.height=0
    q.roi.width=0
    q.roi.do_rectify=False
    pub.publish(q)
    rate.sleep()


#!/usr/bin/env python

import rospy
import cv2
from sensor_msgs.msg import CameraInfo

rospy.init_node('camers_info', anonymous=True)

pub = rospy.Publisher('/camera_rect/camera_info', CameraInfo, queue_size=10)
rate = rospy.Rate(60)
while not rospy.is_shutdown():
    q=CameraInfo()
    q.header.frame_id='usb_cam'
    q.height=480
    q.width=640

    # message of laptop camera
    
    # q.D=[-0.011564379996107469, -0.13278346529156865, 0.002871276933386434, 0.012271004247334799, 0.0]
    # q.K=[621.3059884025869, 0.0, 356.0044670915155, 0.0, 613.6311250528399, 228.0540546135174, 0.0, 0.0, 1.0]
    # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    # q.P=[607.4340209960938, 0.0, 363.77425307081285, 0.0, 0.0, 611.0780029296875, 228.238811434112, 0.0, 0.0, 0.0, 1.0, 0.0]
   
   
   
    # message of camera1
    # q.D=[-1.9819562520245713, 11.24658065837339, -0.16316165042756223, 0.1440911021230497, 0.0]
    # q.K=[1125.718720866548, 0.0, 315.06250520584933, 0.0, 3060.327452265269, 211.01406054383608, 0.0, 0.0, 1.0]
    # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    # q.P=[1020.1680297851562, 0.0, 359.16432937780337, 0.0, 0.0, 3213.299560546875, 178.4188567831734, 0.0, 0.0, 0.0, 1.0, 0.0]
    
    # message of IR1
    q.D=[0.0, 0.0, 0.0, 0.0, 0.0]
    q.K=[424.0954284667969, 0.0, 423.69146728515625, 0.0, 424.0954284667969, 240.66384887695312, 0.0, 0.0, 1.0]
    q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0]
    q.P=[424.0954284667969, 0.0, 423.69146728515625, 0.0, 0.0, 424.0954284667969, 240.66384887695312, 0.0, 0.0, 0.0, 1.0, 0.0]
    q.binning_x=0
    q.binning_y=0
    q.roi.x_offset=0
    q.roi.y_offset=0
    q.roi.height=0
    q.roi.width=0
    q.roi.do_rectify=False
    pub.publish(q)
    rate.sleep()
#!/usr/bin/env python # message of laptop camera # q.D=[-0.011564379996107469, -0.13278346529156865, 0.002871276933386434, 0.012271004247334799, 0.0] # q.K=[621.3059884025869, 0.0, 356.0044670915155, 0.0, 613.6311250528399, 228.0540546135174, 0.0, 0.0, 1.0] # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] # q.P=[607.4340209960938, 0.0, 363.77425307081285, 0.0, 0.0, 611.0780029296875, 228.238811434112, 0.0, 0.0, 0.0, 1.0, 0.0] # message of camera1 # q.D=[-1.9819562520245713, 11.24658065837339, -0.16316165042756223, 0.1440911021230497, 0.0] # q.K=[1125.718720866548, 0.0, 315.06250520584933, 0.0, 3060.327452265269, 211.01406054383608, 0.0, 0.0, 1.0] # q.R=[1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] # q.P=[1020.1680297851562, 0.0, 359.16432937780337, 0.0, 0.0, 3213.299560546875, 178.4188567831734, 0.0, 0.0, 0.0, 1.0, 0.0] # message of IR1