Go to the documentation of this file.00001
00002 import rospy
00003 from sensor_msgs.msg import CameraInfo
00004
00005 class RelayCameraInfo():
00006 def __init__(self):
00007 rospy.init_node('relay_camera_info')
00008 self.frame_id = rospy.get_param('~frame_id')
00009 self.pub = rospy.Publisher("output", CameraInfo)
00010 rospy.Subscriber("input", CameraInfo, self.callback)
00011 rospy.spin()
00012
00013 def callback(self, info):
00014 info.header.frame_id = self.frame_id
00015 self.pub.publish(info)
00016
00017 if __name__ == '__main__':
00018 RelayCameraInfo()