class PublisherManager:
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 |
Unregisters a client from all publishers that they are registered to. |
Instance Variable | unregister |
Undocumented |
Instance Variable | unregister |
Undocumented |
Method | _unregister |
Undocumented |
Instance Variable | _publishers |
Undocumented |
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.
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
- 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