46 pub = rospy.Publisher(topic, ColorRGBA, queue_size=10)
47 rospy.init_node(
'color_talker', anonymous=
True)
48 print(
"\n\nNode running. To see messages, please type\n\t'rostopic echo %s'\nIn another window\n\n"%(rospy.resolve_name(topic)))
49 while not rospy.is_shutdown():
52 pub.publish(1, 2, 3, 4)
60 rospy.loginfo(
"I have %s subscribers"%pub.get_num_connections())
62 if __name__ ==
'__main__':
65 except rospy.ROSInterruptException:
pass