Public Member Functions | |
def | __init__ (self, args=None, **kwargs) |
def | close (self) |
def | close_batch (self) |
def | format_message_meta (self, topic, msg, stamp, index=None) |
def | format_meta (self) |
def | get_batch (self) |
def | get_message_class (self, typename, typehash=None) |
def | get_message_definition (self, msg_or_type) |
def | get_message_meta (self, topic, msg, stamp, index=None) |
def | get_message_type_hash (self, msg_or_type) |
def | get_meta (self) |
def | is_processable (self, topic, msg, stamp, index=None) |
def | notify (self, status) |
def | read (self) |
def | validate (self) |
![]() | |
def | __enter__ (self) |
def | __exit__ (self, exc_type, exc_value, traceback) |
def | __iter__ (self) |
def | bind (self, sink) |
def | thread_excepthook (self, text, exc) |
![]() | |
def | conditions_get_topics (self) |
def | conditions_register_message (self, topic, msg) |
def | conditions_set_topic_state (self, topic, pure) |
def | has_conditions (self) |
def | is_conditions_topic (self, topic, pure=True) |
Public Attributes | |
args | |
bar | |
valid | |
![]() | |
args | |
bar | |
ProgressBar instance, if any. More... | |
preprocess | |
Apply all filter arguments when reading, not only topic and type. More... | |
sink | |
outputs.Sink instance bound to this source More... | |
topics | |
All topics in source, as {(topic, typenane, typehash): total message count or None}. More... | |
valid | |
Result of validate() More... | |
Static Public Attributes | |
DEFAULT_ARGS | |
Constructor argument defaults. More... | |
string | MESSAGE_META_TEMPLATE = "{topic} {index}/{total} ({type} {dt} {stamp})" |
Template for message metainfo line. More... | |
string | META_TEMPLATE = "\nFile {file} ({size}), {tcount} topics, {mcount:,d} messages\n" \ |
Template for bag metainfo header. More... | |
![]() | |
DEFAULT_ARGS | |
Constructor argument defaults. More... | |
string | MESSAGE_META_TEMPLATE = "{topic} #{index} ({type} {dt} {stamp})" |
Template for message metainfo line. More... | |
![]() | |
DEFAULT_ARGS = dict(CONDITION=()) | |
Constructor argument defaults. More... | |
TOPIC_RGX = re.compile(r"<topic\s+([^\s><]+)\s*>") | |
Private Member Functions | |
def | _configure (self, filename=None, bag=None) |
def | _ensure_totals (self) |
def | _init_progress (self) |
def | _produce (self, topics, start_time=None) |
def | _produce_bags (self) |
Private Attributes | |
_args0 | |
_bag | |
_bag0 | |
_filename | |
_meta | |
_running | |
_status | |
_sticky | |
_topics | |
_totals_ok | |
_types_ok | |
def grepros.inputs.BagSource.__init__ | ( | self, | |
args = None , |
|||
** | kwargs | ||
) |
@param args arguments as namespace or dictionary, case-insensitive; or a single path as the ROS bagfile to read, or a stream to read from, or one or more {@link grepros.api.Bag Bag} instances <!--sep--> Bag-specific arguments: @param args.file names of ROS bagfiles to read if not all in directory, or a stream to read from; or one or more {@link grepros.api.Bag Bag} instances @param args.path paths to scan if not current directory @param args.recurse recurse into subdirectories when looking for bagfiles @param args.orderby "topic" or "type" if any to group results by @param args.decompress decompress archived bags to file directory @param args.reindex make a copy of unindexed bags and reindex them (ROS1 only) @param args.write outputs, to skip in input files @param args.bag one or more {@link grepros.api.Bag Bag} instances <!--sep--> General arguments: @param args.topic ROS topics to read if not all @param args.type ROS message types to read if not all @param args.skip_topic ROS topics to skip @param args.skip_type ROS message types to skip @param args.start_time earliest timestamp of messages to read @param args.end_time latest timestamp of messages to read @param args.start_index message index within topic to start from @param args.end_index message index within topic to stop at @param args.unique emit messages that are unique in topic @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 @param args.nth_interval minimum time interval between messages in topic @param args.condition Python expressions that must evaluate as true for message to be processable, see ConditionMixin @param args.progress whether to print progress bar @param args.stop_on_error stop execution on any error like unknown message type @param kwargs any and all arguments as keyword overrides, case-insensitive
Reimplemented from grepros.inputs.Source.
|
private |
|
private |
|
private |
|
private |
|
private |
def grepros.inputs.BagSource.close | ( | self | ) |
Closes current bag, if any.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.close_batch | ( | self | ) |
Closes current bag, if any.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.format_message_meta | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns message metainfo string.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.format_meta | ( | self | ) |
Returns bagfile metainfo string.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_batch | ( | self | ) |
Returns name of current bagfile, or self if reading stream.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_message_class | ( | self, | |
typename, | |||
typehash = None |
|||
) |
Returns ROS message type class.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_message_definition | ( | self, | |
msg_or_type | |||
) |
Returns ROS message type definition full text, including subtype definitions.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_message_meta | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns message metainfo data dict.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_message_type_hash | ( | self, | |
msg_or_type | |||
) |
Returns ROS message type MD5 hash.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.get_meta | ( | self | ) |
Returns bagfile metainfo data dict.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.is_processable | ( | self, | |
topic, | |||
msg, | |||
stamp, | |||
index = None |
|||
) |
Returns whether message passes source filters.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.notify | ( | self, | |
status | |||
) |
Reports match status of last produced message.
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.read | ( | self | ) |
Yields messages from ROS bagfiles, as (topic, msg, ROS time).
Reimplemented from grepros.inputs.Source.
def grepros.inputs.BagSource.validate | ( | self | ) |
Returns whether ROS environment is set and arguments valid, prints error if not.
Reimplemented from grepros.inputs.Source.
|
static |
Constructor argument defaults.
|
static |