|
grepros 1.2.2
grep for ROS bag files and live topics
|
Message producer base class. More...

Classes | |
| class | SourceMessage |
| Returned from read() as (topic name, ROS message, ROS timestamp object). More... | |
Public Member Functions | |
| __init__ (self, args=None, **kwargs) | |
| __enter__ (self) | |
| Context manager entry. | |
| __exit__ (self, exc_type, exc_value, traceback) | |
| Context manager exit, closes source. | |
| __iter__ (self) | |
| Yields messages from source, as (topic, msg, ROS time). | |
| bind (self, sink) | |
| Attaches sink to source. | |
| close (self) | |
| Shuts down input, closing any files or connections. | |
| close_batch (self) | |
| Shuts down input batch if any (like bagfile), else all input. | |
| configure (self, args=None, **kwargs) | |
| Updates source configuration. | |
| configure_progress (self, **kwargs) | |
| Configures progress bar options, updates current bar if any. | |
| format_message_meta (self, topic, msg, stamp, index=None) | |
| Returns message metainfo string. | |
| format_meta (self) | |
| Returns source metainfo string. | |
| get_batch (self) | |
| Returns source batch identifier if any (like bagfile name if BagSource). | |
| get_message_class (self, typename, typehash=None) | |
| Returns message type class. | |
| get_message_definition (self, msg_or_type) | |
| Returns ROS message type definition full text, including subtype definitions. | |
| get_message_meta (self, topic, msg, stamp, index=None) | |
| Returns message metainfo data dict. | |
| get_message_type_hash (self, msg_or_type) | |
| Returns ROS message type MD5 hash. | |
| get_meta (self) | |
| Returns source metainfo data dict. | |
| init_progress (self) | |
| Initializes progress bar, if any. | |
| is_processable (self, topic, msg, stamp, index=None) | |
| Returns whether message passes source filters; registers status. | |
| notify (self, status) | |
| Reports match status of last produced message. | |
| read (self) | |
| Yields messages from source, as (topic, msg, ROS time). | |
| thread_excepthook (self, text, exc) | |
| Handles exception, used by background threads. | |
| update_progress (self, count, running=True) | |
| Updates progress bar, if any, with source processed count, pauses bar if not running. | |
| validate (self) | |
| Returns whether arguments are valid and source prerequisites are met. | |
Public Attributes | |
| args | |
| bar | |
| ProgressBar instance, if any. | |
| preprocess | |
| Apply all filter arguments when reading, not only topic and type. | |
| sink | |
| outputs.Sink instance bound to this source | |
| topics | |
| All topics in source, as {(topic, typenane, typehash): total message count or None}. | |
| valid | |
| Result of validate() | |
Static Public Attributes | |
| DEFAULT_ARGS | |
| Constructor argument defaults. | |
| str | MESSAGE_META_TEMPLATE = "{topic} #{index} ({type} {dt} {stamp})" |
| Template for message metainfo line. | |
| __init__ | ( | self, | |
args = None, |
|||
| ** | kwargs | ||
| ) |
| args | arguments as namespace or dictionary, case-insensitive |
| args.start_time | earliest timestamp of messages to read |
| args.end_time | latest timestamp of messages to read |
| args.unique | emit messages that are unique in topic |
| args.start_index | message index within topic to start from |
| args.end_index | message index within topic to stop at |
| args.select_field | message fields to use for uniqueness if not all |
| args.noselect_field | message fields to skip for uniqueness |
| args.nth_message | read every Nth message in topic, starting from first |
| args.nth_interval | minimum time interval between messages in topic, as seconds or ROS duration |
| args.progress | whether to print progress bar |
| kwargs | any and all arguments as keyword overrides, case-insensitive |
Reimplemented in BagSource, LiveSource, and AppSource.
| __exit__ | ( | self, | |
| exc_type, | |||
| exc_value, | |||
| traceback | |||
| ) |
| __iter__ | ( | self | ) |
| bind | ( | self, | |
| sink | |||
| ) |
| close | ( | self | ) |
Shuts down input, closing any files or connections.
Reimplemented in BagSource, LiveSource, and AppSource.
| close_batch | ( | self | ) |
| configure | ( | self, | |
args = None, |
|||
| ** | kwargs | ||
| ) |
| configure_progress | ( | self, | |
| ** | kwargs | ||
| ) |
| format_message_meta | ( | self, | |
| topic, | |||
| msg, | |||
| stamp, | |||
index = None |
|||
| ) |
| format_meta | ( | self | ) |
Returns source metainfo string.
Reimplemented in BagSource, and LiveSource.
| get_batch | ( | self | ) |
| get_message_class | ( | self, | |
| typename, | |||
typehash = None |
|||
| ) |
Returns message type class.
Reimplemented in BagSource, and LiveSource.
| get_message_definition | ( | self, | |
| msg_or_type | |||
| ) |
Returns ROS message type definition full text, including subtype definitions.
Reimplemented in BagSource, and LiveSource.
| get_message_meta | ( | self, | |
| topic, | |||
| msg, | |||
| stamp, | |||
index = None |
|||
| ) |
Returns message metainfo data dict.
Reimplemented in BagSource, and LiveSource.
| get_message_type_hash | ( | self, | |
| msg_or_type | |||
| ) |
Returns ROS message type MD5 hash.
Reimplemented in BagSource, and LiveSource.
| get_meta | ( | self | ) |
Returns source metainfo data dict.
Reimplemented in BagSource, and LiveSource.
| init_progress | ( | self | ) |
Initializes progress bar, if any.
Reimplemented in BagSource, and LiveSource.
| is_processable | ( | self, | |
| topic, | |||
| msg, | |||
| stamp, | |||
index = None |
|||
| ) |
Returns whether message passes source filters; registers status.
Reimplemented in BagSource, LiveSource, and AppSource.
| notify | ( | self, | |
| status | |||
| ) |
| read | ( | self | ) |
Yields messages from source, as (topic, msg, ROS time).
Reimplemented in BagSource, LiveSource, and AppSource.
| thread_excepthook | ( | self, | |
| text, | |||
| exc | |||
| ) |
| update_progress | ( | self, | |
| count, | |||
running = True |
|||
| ) |
Updates progress bar, if any, with source processed count, pauses bar if not running.
Reimplemented in LiveSource.
| validate | ( | self | ) |
Returns whether arguments are valid and source prerequisites are met.
Reimplemented in BagSource, LiveSource, and AppSource.
|
static |
|
static |
| preprocess |
| topics |