|
| class | SourceMessage |
| | Returned from read() as (topic name, ROS message, ROS timestamp object). More...
|
| |
|
| | __init__ (self, args=None, **kwargs) |
| |
| | __enter__ (self) |
| |
| | __exit__ (self, exc_type, exc_value, traceback) |
| |
| | __iter__ (self) |
| |
| | bind (self, sink) |
| |
| | close (self) |
| |
| | close_batch (self) |
| |
| | configure (self, args=None, **kwargs) |
| |
| | configure_progress (self, **kwargs) |
| |
| | format_message_meta (self, topic, msg, stamp, index=None) |
| |
| | format_meta (self) |
| |
| | get_batch (self) |
| |
| | get_message_class (self, typename, typehash=None) |
| |
| | get_message_definition (self, msg_or_type) |
| |
| | get_message_meta (self, topic, msg, stamp, index=None) |
| |
| | get_message_type_hash (self, msg_or_type) |
| |
| | get_meta (self) |
| |
| | init_progress (self) |
| |
| | is_processable (self, topic, msg, stamp, index=None) |
| |
| | notify (self, status) |
| |
| | read (self) |
| |
| | thread_excepthook (self, text, exc) |
| |
| | update_progress (self, count, running=True) |
| |
| | validate (self) |
| |
|
| | 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()
|
| |
Message producer base class.
Definition at line 35 of file inputs.py.
◆ __init__()
| __init__ |
( |
|
self, |
|
|
|
args = None, |
|
|
** |
kwargs |
|
) |
| |
@param args arguments as namespace or dictionary, case-insensitive
@param args.start_time earliest timestamp of messages to read
@param args.end_time latest timestamp of messages to read
@param args.unique emit messages that are unique in topic
@param args.start_index message index within topic to start from
@param args.end_index message index within topic to stop at
@param args.select_field message fields to use for uniqueness if not all
@param args.noselect_field message fields to skip for uniqueness
@param args.nth_message read every Nth message in topic, starting from first
@param args.nth_interval minimum time interval between messages in topic,
as seconds or ROS duration
@param args.progress whether to print progress bar
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented in BagSource, LiveSource, and AppSource.
Definition at line 49 of file inputs.py.
◆ __enter__()
Context manager entry.
Definition at line 96 of file inputs.py.
◆ __exit__()
| __exit__ |
( |
|
self, |
|
|
|
exc_type, |
|
|
|
exc_value, |
|
|
|
traceback |
|
) |
| |
Context manager exit, closes source.
Definition at line 100 of file inputs.py.
◆ __iter__()
Yields messages from source, as (topic, msg, ROS time).
Definition at line 92 of file inputs.py.
◆ bind()
◆ close()
◆ close_batch()
Shuts down input batch if any (like bagfile), else all input.
Reimplemented in BagSource.
Definition at line 141 of file inputs.py.
◆ configure()
| configure |
( |
|
self, |
|
|
|
args = None, |
|
|
** |
kwargs |
|
) |
| |
Updates source configuration.
@param args arguments as namespace or dictionary, case-insensitive
@param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented in BagSource.
Definition at line 111 of file inputs.py.
◆ configure_progress()
| configure_progress |
( |
|
self, |
|
|
** |
kwargs |
|
) |
| |
Configures progress bar options, updates current bar if any.
Definition at line 220 of file inputs.py.
◆ format_message_meta()
| format_message_meta |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp, |
|
|
|
index = None |
|
) |
| |
◆ format_meta()
◆ get_batch()
Returns source batch identifier if any (like bagfile name if BagSource).
Reimplemented in BagSource.
Definition at line 155 of file inputs.py.
◆ get_message_class()
| get_message_class |
( |
|
self, |
|
|
|
typename, |
|
|
|
typehash = None |
|
) |
| |
◆ get_message_definition()
| get_message_definition |
( |
|
self, |
|
|
|
msg_or_type |
|
) |
| |
Returns ROS message type definition full text, including subtype definitions.
Reimplemented in BagSource, and LiveSource.
Definition at line 173 of file inputs.py.
◆ get_message_meta()
| get_message_meta |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp, |
|
|
|
index = None |
|
) |
| |
◆ get_message_type_hash()
| get_message_type_hash |
( |
|
self, |
|
|
|
msg_or_type |
|
) |
| |
◆ get_meta()
◆ init_progress()
◆ is_processable()
| is_processable |
( |
|
self, |
|
|
|
topic, |
|
|
|
msg, |
|
|
|
stamp, |
|
|
|
index = None |
|
) |
| |
◆ notify()
Reports match status of last produced message.
Reimplemented in BagSource.
Definition at line 214 of file inputs.py.
◆ read()
◆ thread_excepthook()
| thread_excepthook |
( |
|
self, |
|
|
|
text, |
|
|
|
exc |
|
) |
| |
Handles exception, used by background threads.
Definition at line 247 of file inputs.py.
◆ update_progress()
| update_progress |
( |
|
self, |
|
|
|
count, |
|
|
|
running = True |
|
) |
| |
Updates progress bar, if any, with source processed count, pauses bar if not running.
Reimplemented in LiveSource.
Definition at line 238 of file inputs.py.
◆ validate()
◆ args
◆ bar
ProgressBar instance, if any.
Definition at line 84 of file inputs.py.
◆ DEFAULT_ARGS
Initial value:= dict(START_TIME=None, END_TIME=None, START_INDEX=None, END_INDEX=None,
UNIQUE=False, SELECT_FIELD=(), NOSELECT_FIELD=(),
NTH_MESSAGE=1, NTH_INTERVAL=0, PROGRESS=False)
Constructor argument defaults.
Definition at line 45 of file inputs.py.
◆ MESSAGE_META_TEMPLATE
| str MESSAGE_META_TEMPLATE = "{topic} #{index} ({type} {dt} {stamp})" |
|
static |
Template for message metainfo line.
Definition at line 42 of file inputs.py.
◆ preprocess
Apply all filter arguments when reading, not only topic and type.
Definition at line 88 of file inputs.py.
◆ sink
outputs.Sink instance bound to this source
Definition at line 80 of file inputs.py.
◆ topics
All topics in source, as {(topic, typenane, typehash): total message count or None}.
Definition at line 82 of file inputs.py.
◆ valid
Result of validate()
Definition at line 86 of file inputs.py.
The documentation for this class was generated from the following file: