Package rospy :: Module topics

Module topics

source code

rospy implementation of topics.

Client API

Publisher and Subscriber are the client API for topics.

Internal Implementation

Internally, _TopicImpl instances (_PublisherImpl/_SubscriberImpl) are used to manage actual transport connections. The _TopicManager is responsible for tracking the system-wide state of publications and subscriptions as well as the _TopicImpl instances. More info is below.

_TopicManager

The _TopicManager does the backend topic bookkeeping for the local node. Use get_topic_manager() to access singleton. Actual topic implementations are done through the _TopicImpl/_PublisherImpl/_SubscriberImpl hierarchy. Client code generates instances of type Publisher/Subscriber, which enable to client to create multiple publishers/subscribers of that topic that get controlled access to the underlying share connections.

Common parent classes for all rospy topics. The rospy topic autogenerators create classes that are children of these implementations.

Classes
  Topic
Base class of Publisher and Subscriber
  Subscriber
Class for registering as a subscriber to a specified topic, where the messages are of a given type.
  SubscribeListener
Callback API to receive notifications when new subscribers connect and disconnect.
  Publisher
Class for registering as a publisher of a ROS topic.
Variables
  __package__ = 'rospy'