3 from __future__
import division
6 from pcl_msgs.msg
import PointIndices
8 from sensor_msgs.msg
import CameraInfo
9 from sensor_msgs.msg
import Image
10 from stereo_msgs.msg
import DisparityImage
17 '~output/pose', PoseStamped, queue_size=1)
19 '~output/mask', Image, queue_size=1)
21 '~output/mask_indices', PointIndices, queue_size=1)
23 '~output/left_image', Image, queue_size=1)
25 '~output/left_camera_info', CameraInfo, queue_size=1)
27 '~output/right_camera_info', CameraInfo, queue_size=1)
29 '~output/disparity', DisparityImage, queue_size=1)
39 rospy.Subscriber(
'~input/pose', PoseStamped, self.
_pose_cb)
40 rospy.Subscriber(
'~input/mask', Image, self.
_mask_cb)
41 rospy.Subscriber(
'~input/mask_indices', PointIndices, self.
_indices_cb)
50 r = rospy.Rate(rospy.get_param(
'~rate', 10))
51 while not rospy.is_shutdown():
55 except rospy.ROSTimeMovedBackwardsException:
89 now = rospy.Time.now()
90 self.latest_pose.header.stamp = now
91 self.latest_mask.header.stamp = now
92 self.latest_mask_indices.header.stamp = now
93 self.latest_left_image.header.stamp = now
94 self.latest_left_camera_info.header.stamp = now
95 self.latest_right_camera_info.header.stamp = now
96 self.latest_disparity.header.stamp = now
107 if __name__ ==
'__main__':
108 rospy.init_node(
'sample_topic_ensync_for_capture_stereo_synchronizer')
def _right_camera_info_cb(self, msg)
def _indices_cb(self, msg)
def _left_camera_info_cb(self, msg)
def _left_image_cb(self, msg)
def _disparity_cb(self, msg)