- def talker():
- topic = 'floats'
- pub = rospy.Publisher(topic, numpy_msg(Floats))
- rospy.init_node(topic, anonymous=True)
- r = rospy.Rate(10) # 10hz
- rospy.loginfo("I will publish to the topic %s", topic)
- while not rospy.is_shutdown():
- a = numpy.array([1.0, 2.1, 3.2, 4.3, 5.4, 6.5], dtype=numpy.float32)
- if __name__ == '__main__':
130s Nov 2nd, 2012 668 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data