def __init__(self):
self.data_dir = rospy.get_param('/store_data/data_dir')
self.category = rospy.get_param('/store_data/category')
self.pic_count = rospy.get_param('/store_data/init_idx')
self.rate = 1/float(rospy.get_param('/store_data/rate'))
self.bridge = CvBridge()
self.image_sub = rospy.Subscriber('/camera/rgb/image_color', Image, self.img_cb)
self.patches_sub = rospy.Subscriber('/candidate_regions_depth', PolygonStamped, self.patches_cb)
self.capture_sub = rospy.Subscriber('/capture/keyboard', Bool, self.capture_cb)
# you can read this value off of your sensor from the '/camera/depth_registered/camera_info' topic
self.P = np.array([[525.0, 0.0, 319.5, 0.0], [0.0, 525.0, 239.5, 0.0], [0.0, 0.0, 1.0, 0.0]])
self.capture = False
评论列表
文章目录