Takes a normal ROS callback channel and gives it an on demand query style interface. More...
Public Member Functions | |
def | __init__ |
Message has to have a header. | |
def | read |
Supported use cases rfid - want to get a reading, can be stale, no duplication allowed (allow None), query speed important hokuyo - want to get a reading, can be stale, no duplication allowed (don't want a None), willing to wait for new data (default) ft - want to get a reading, can be stale, duplication allowed (don't want a None), query speed important NOT ALLOWED duplication allowed, willing to wait for new data. | |
Public Attributes | |
curid | |
delay_tolerance | |
last_call_back | |
last_msg_returned | |
message_extractor | |
node_name | |
reading | |
Private Member Functions | |
def | _check_for_delivery_hiccups |
def | _wait_for_first_read |
Takes a normal ROS callback channel and gives it an on demand query style interface.
def hrl_lib.rutils.GenericListener.__init__ | ( | self, | |
node_name, | |||
message_type, | |||
listen_channel, | |||
frequency, | |||
message_extractor = None , |
|||
queue_size = None |
|||
) |
Message has to have a header.
node_name | name of node (if haven't been inited) |
message_type | type of message to listen for |
listen_channel | ROS channel to listen |
frequency | the frequency to expect messages (used to print warning statements to console) |
message_extractor | function to preprocess the message into a desired format |
queue_size | ROS subscriber queue (None = infinite) |
def hrl_lib.rutils.GenericListener._check_for_delivery_hiccups | ( | self | ) | [private] |
def hrl_lib.rutils.GenericListener._wait_for_first_read | ( | self, | |
quiet = False |
|||
) | [private] |
def hrl_lib.rutils.GenericListener.read | ( | self, | |
allow_duplication = False , |
|||
willing_to_wait = True , |
|||
warn = False , |
|||
quiet = True |
|||
) |
Supported use cases rfid - want to get a reading, can be stale, no duplication allowed (allow None), query speed important hokuyo - want to get a reading, can be stale, no duplication allowed (don't want a None), willing to wait for new data (default) ft - want to get a reading, can be stale, duplication allowed (don't want a None), query speed important NOT ALLOWED duplication allowed, willing to wait for new data.