A class for managing several ROS publishers repeating messages with different rates. The main purpose of this class is for unit testing.
Adds a topic for future publication. This creates a rospy.Publisher internally. Note that the publisher will latch the topic; if that wasn't the case, clients might need to sleep before publishing something for the first time to give subscribers enough time to connect.
Publishes `message' on the given topic. If `rate' is not None, the message will be repeated at the given rate (expected to be in Hz) until pub() or stop() are invoked again. Note that `rate' may also be a function, in which case it'll be invoked for each publication to obtain the message.