class documentation

class PublisherManager:

View In Hierarchy

The PublisherManager keeps track of ROS publishers

It maintains a MultiPublisher instance for each registered topic

When unregistering a client, if there are no more clients for a publisher, then that publisher is unregistered from the ROS Master

Method __init__ Undocumented
Method publish Publish a message on the given topic.
Method register Register a publisher on the specified topic.
Method unregister Will wait some time before actually unregistering, it is done in _unregister_impl
Method unregister_all Unregisters a client from all publishers that they are registered to.
Instance Variable unregister_timeout Undocumented
Instance Variable unregister_timers Undocumented
Method _unregister_impl Undocumented
Instance Variable _publishers Undocumented
def __init__(self):

Undocumented

def publish(self, client_id, topic, msg, latch=False, queue_size=100):

Publish a message on the given topic.

Tries to create a publisher on the topic if one does not already exist.

Keyword arguments: client_id -- the ID of the client making this request topic -- the topic to publish the message on msg -- a JSON-like dict of fields and values latch -- (optional) whether to make this publisher latched queue_size -- (optional) rospy publisher queue_size to use

Throws: Exception -- a variety of exceptions are propagated. They can be thrown if there is a problem setting up or getting the publisher, or if the provided msg does not map to the msg class of the publisher.

def register(self, client_id, topic, msg_type=None, latch=False, queue_size=100):

Register a publisher on the specified topic.

Publishers are shared between clients, so a single MultiPublisher instance is created per topic, even if multiple clients register.

Keyword arguments: client_id -- the ID of the client making this request topic -- the name of the topic to publish on msg_type -- (optional) the type to publish latch -- (optional) whether to make this publisher latched queue_size -- (optional) rospy publisher queue_size to use

Throws: Exception -- exceptions are propagated from the MultiPublisher if there is a problem loading the specified msg class or establishing the publisher

def unregister(self, client_id, topic):

Unregister a client from the publisher for the given topic.
Will wait some time before actually unregistering, it is done in _unregister_impl

If there are no clients remaining for that publisher, then the publisher is unregistered from the ROS Master

Keyword arguments: client_id -- the ID of the client making this request topic -- the topic to unregister the publisher for

def unregister_all(self, client_id):

Unregisters a client from all publishers that they are registered to.

Keyword arguments: client_id -- the ID of the client making this request

unregister_timeout: float =

Undocumented

unregister_timers: dict =

Undocumented

def _unregister_impl(self, topic):

Undocumented

_publishers: dict =

Undocumented