Subscriber Proxy. More...
Public Member Functions | |
def | __call__ |
def | __init__ |
def | unregister |
def | wait_for_next |
def | wait_for_publishers |
Private Member Functions | |
def | _callback |
Private Attributes | |
_data | |
_subscriber |
Subscriber Proxy.
Works like a service proxy, but using a subscriber instead.
Definition at line 16 of file src/rocon_python_comms/subscriber_proxy.py.
def rocon_python_comms.subscriber_proxy.SubscriberProxy.__init__ | ( | self, | |
topic, | |||
msg_type | |||
) |
@param topic : the topic name to subscriber to @type str @param msg_type : any ros message type (typical arg for the subscriber) @type msg @param timeout : timeout on the wait operation (None = /infty) @type rospy.Duration() @return msg type data or None
Definition at line 20 of file src/rocon_python_comms/subscriber_proxy.py.
def rocon_python_comms.subscriber_proxy.SubscriberProxy.__call__ | ( | self, | |
timeout = None |
|||
) |
Returns immediately with the latest data or waits for incoming data. @param timeout : time to wait for data, polling at 10Hz. @type rospy.Duration @return latest data or None
Definition at line 33 of file src/rocon_python_comms/subscriber_proxy.py.
def rocon_python_comms.subscriber_proxy.SubscriberProxy._callback | ( | self, | |
data | |||
) | [private] |
Definition at line 74 of file src/rocon_python_comms/subscriber_proxy.py.
Unregister the subscriber so future instantiations of this class can pull a fresh subscriber (important if the data is latched).
Definition at line 77 of file src/rocon_python_comms/subscriber_proxy.py.
def rocon_python_comms.subscriber_proxy.SubscriberProxy.wait_for_next | ( | self, | |
timeout = None |
|||
) |
Makes sure any current data is cleared and waits for new data.
Definition at line 52 of file src/rocon_python_comms/subscriber_proxy.py.
Blocks until publishers are seen. @raise rospy.exceptions.ROSInterruptException if we are in shutdown.
Definition at line 59 of file src/rocon_python_comms/subscriber_proxy.py.
Definition at line 28 of file src/rocon_python_comms/subscriber_proxy.py.
Definition at line 28 of file src/rocon_python_comms/subscriber_proxy.py.