grepros 1.2.2
grep for ROS bag files and live topics
|
Publishes messages to ROS topics. More...
Public Member Functions | |
__init__ (self, args=None, **kwargs) | |
bind (self, source) | |
Attaches source to sink and blocks until connected to ROS. | |
close (self) | |
Shuts down publishers. | |
emit (self, topic, msg, stamp=None, match=None, index=None) | |
Publishes message to output topic. | |
validate (self) | |
Returns whether ROS environment is set for publishing, and output topic configuration is valid, emits error if not. | |
Public Member Functions inherited from Sink | |
__init__ (self, args=None, **kwargs) | |
__enter__ (self) | |
Context manager entry. | |
__exit__ (self, exc_type, exc_value, traceback) | |
Context manager exit, closes sink. | |
autodetect (cls, target) | |
Returns true if target is recognizable as output for this sink class. | |
bind (self, source) | |
Attaches source to sink. | |
close (self) | |
Shuts down output, closing any files or connections. | |
configure (self, args=None, **kwargs) | |
Updates sink configuration. | |
emit (self, topic, msg, stamp=None, match=None, index=None) | |
Outputs ROS message. | |
emit_meta (self) | |
Outputs source metainfo like bag header as debug stream, if not already emitted. | |
flush (self) | |
Writes out any pending data to disk. | |
is_highlighting (self) | |
Returns whether this sink requires highlighted matches. | |
thread_excepthook (self, text, exc) | |
Handles exception, used by background threads. | |
validate (self) | |
Returns whether sink prerequisites are met (like ROS environment set if LiveSink). | |
Public Attributes | |
valid | |
Public Attributes inherited from Sink | |
args | |
source | |
inputs.Source instance bound to this sink | |
valid | |
Result of validate() | |
Static Public Attributes | |
DEFAULT_ARGS | |
Constructor argument defaults. | |
Static Public Attributes inherited from Sink | |
DEFAULT_ARGS = dict(META=False) | |
Constructor argument defaults. | |
tuple | FILE_EXTENSIONS = () |
Auto-detection file extensions for subclasses, as (".ext", ) | |
Publishes messages to ROS topics.
Definition at line 780 of file outputs.py.
__init__ | ( | self, | |
args = None , |
|||
** | kwargs | ||
) |
args | arguments as namespace or dictionary, case-insensitive |
args.live | whether reading messages from live ROS topics |
args.queue_size_out | publisher queue size (default 10) |
args.publish_prefix | output topic prefix, prepended to input topic |
args.publish_suffix | output topic suffix, appended to output topic |
args.publish_fixname | single output topic name to publish to, overrides prefix and suffix if given |
args.meta | whether to emit metainfo |
args.verbose | whether to emit debug information |
kwargs | any and all arguments as keyword overrides, case-insensitive |
Reimplemented from Sink.
Definition at line 800 of file outputs.py.
bind | ( | self, | |
source | |||
) |
Attaches source to sink and blocks until connected to ROS.
Reimplemented from Sink.
Definition at line 828 of file outputs.py.
close | ( | self | ) |
emit | ( | self, | |
topic, | |||
msg, | |||
stamp = None , |
|||
match = None , |
|||
index = None |
|||
) |
Publishes message to output topic.
Reimplemented from Sink.
Definition at line 806 of file outputs.py.
validate | ( | self | ) |
Returns whether ROS environment is set for publishing, and output topic configuration is valid, emits error if not.
Reimplemented from Sink.
Definition at line 838 of file outputs.py.
|
static |
Constructor argument defaults.
Definition at line 784 of file outputs.py.
valid |
Definition at line 849 of file outputs.py.