42 hello_str =
"hello world %s" % event.current_real.to_sec()
43 rospy.loginfo(hello_str)
44 pub.publish(hello_str)
47 if __name__ ==
'__main__':
49 rospy.init_node(
'talker', anonymous=
True)
50 pub = rospy.Publisher(
'chatter', String, queue_size=10)
51 timer = rospy.Timer(rospy.Duration(1. / 10), publish_callback)
53 except rospy.ROSInterruptException:
def publish_callback(event)