Public Member Functions | Private Attributes
rate_publishers.RatePublishers Class Reference

List of all members.

Public Member Functions

def __init__
def add_topic
def pub
def spin_once
def stop

Private Attributes

 _publishers

Detailed Description

A class for managing several ROS publishers repeating messages
with different rates.

The main purpose of this class is for unit testing.

Definition at line 72 of file rate_publishers.py.


Constructor & Destructor Documentation

Definition at line 80 of file rate_publishers.py.


Member Function Documentation

def rate_publishers.RatePublishers.add_topic (   self,
  topic,
  msg_type 
)
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.

Definition at line 83 of file rate_publishers.py.

def rate_publishers.RatePublishers.pub (   self,
  topic,
  message,
  rate = None 
)
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.

Definition at line 98 of file rate_publishers.py.

Publishes any scheduled messages and returns the amount of
time until it should be called again.

Definition at line 117 of file rate_publishers.py.

def rate_publishers.RatePublishers.stop (   self,
  topic 
)
Stops repeating any message on the given topic.

Definition at line 111 of file rate_publishers.py.


Member Data Documentation

Definition at line 80 of file rate_publishers.py.


The documentation for this class was generated from the following file:


twist_mux
Author(s): Enrique Fernandez , Siegfried-A. Gevatter Pujals
autogenerated on Fri Aug 28 2015 13:25:02