12 self.
pub = rospy.Publisher(
'~output', ColorHistogram, queue_size=1)
14 rate = rospy.get_param(
'~rate', 1.)
15 rospy.Timer(rospy.Duration(1. / rate), self.
publish)
18 histogram_msg = ColorHistogram()
19 histogram_msg.header.stamp = rospy.Time.now()
20 histogram_msg.header.frame_id = self.
frame_id 22 self.pub.publish(histogram_msg)
24 if __name__==
'__main__':
25 rospy.init_node(
"color_histogram_publisher")