
Public Member Functions | |
| def | __init__ (self, args=None, **kwargs) |
| def | bind (self, sink) |
| def | close (self) |
| def | format_meta (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 | read (self) |
| def | refresh_topics (self) |
| def | validate (self) |
Public Member Functions inherited from grepros.inputs.Source | |
| def | __enter__ (self) |
| def | __exit__ (self, exc_type, exc_value, traceback) |
| def | __iter__ (self) |
| def | close_batch (self) |
| def | format_message_meta (self, topic, msg, stamp, index=None) |
| def | get_batch (self) |
| def | notify (self, status) |
| def | thread_excepthook (self, text, exc) |
Public Member Functions inherited from grepros.inputs.ConditionMixin | |
| def | close_batch (self) |
| 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 | |
| bar | |
| valid | |
Public Attributes inherited from grepros.inputs.Source | |
| 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... | |
| int | MASTER_INTERVAL = 2 |
| Seconds between refreshing available topics from ROS master. More... | |
Static Public Attributes inherited from grepros.inputs.Source | |
| DEFAULT_ARGS | |
| Constructor argument defaults. More... | |
| string | MESSAGE_META_TEMPLATE = "{topic} #{index} ({type} {dt} {stamp})" |
| Template for message metainfo line. More... | |
Static Public Attributes inherited from grepros.inputs.ConditionMixin | |
| DEFAULT_ARGS = dict(CONDITION=()) | |
| Constructor argument defaults. More... | |
| TOPIC_RGX = re.compile(r"<topic\s+([^\s><]+)\s*>") | |
Private Member Functions | |
| def | _configure (self) |
| def | _init_progress (self) |
| def | _on_message (self, topic, msg) |
| def | _run_refresh (self) |
| def | _update_progress (self, count, running=True) |
Private Attributes | |
| _queue | |
| _running | |
| _subs | |
| def grepros.inputs.TopicSource.__init__ | ( | self, | |
args = None, |
|||
| ** | kwargs | ||
| ) |
@param args arguments as namespace or dictionary, case-insensitive
@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.queue_size_in subscriber queue size (default 10)
@param args.ros_time_in stamp messages with ROS time instead of wall time
@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.TopicSource.bind | ( | self, | |
| sink | |||
| ) |
Attaches sink to source and blocks until connected to ROS live.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.close | ( | self | ) |
Shuts down subscribers and stops producing messages.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.format_meta | ( | self | ) |
Returns source metainfo string.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.get_message_class | ( | self, | |
| typename, | |||
typehash = None |
|||
| ) |
Returns message type class, from active subscription if available.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.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.TopicSource.get_message_meta | ( | self, | |
| topic, | |||
| msg, | |||
| stamp, | |||
index = None |
|||
| ) |
Returns message metainfo data dict.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.get_message_type_hash | ( | self, | |
| msg_or_type | |||
| ) |
Returns ROS message type MD5 hash.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.get_meta | ( | self | ) |
Returns source metainfo data dict.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.is_processable | ( | self, | |
| topic, | |||
| msg, | |||
| stamp, | |||
index = None |
|||
| ) |
Returns whether message passes source filters.
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.read | ( | self | ) |
Yields messages from subscribed ROS topics, as (topic, msg, ROS time).
Reimplemented from grepros.inputs.Source.
| def grepros.inputs.TopicSource.refresh_topics | ( | self | ) |
| def grepros.inputs.TopicSource.validate | ( | self | ) |
Returns whether ROS environment is set, prints error if not.
Reimplemented from grepros.inputs.Source.
|
static |
|
static |