republish_camera_info.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import rospy
3 from sensor_msgs.msg import CameraInfo
4 
5 def callback(data):
6  P = list(data.P);
7  P[3] = P[3] * scale
8  data.P = tuple(P);
9  pub.publish(data)
10 
11 if __name__ == '__main__':
12  rospy.init_node('republish_camera_info', anonymous=True)
13  pub = rospy.Publisher('camera_info_out', CameraInfo, queue_size=1)
14  scale = rospy.get_param('~scale', 1.091664)
15  rospy.Subscriber("camera_info_in", CameraInfo, callback)
16  rospy.spin()


rtabmap_ros
Author(s): Mathieu Labbe
autogenerated on Tue Jan 24 2023 04:04:40