grepros 1.3.0
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
LiveSink Class Reference
Inheritance diagram for LiveSink:
Inheritance graph

Public Member Functions

 __init__ (self, args=None, **kwargs)
 
 bind (self, source)
 
 close (self)
 
 emit (self, topic, msg, stamp=None, match=None, index=None)
 
 validate (self)
 
- Public Member Functions inherited from Sink
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_value, traceback)
 
 autodetect (cls, target)
 
 configure (self, args=None, **kwargs)
 
 emit_meta (self)
 
 flush (self)
 
 is_highlighting (self)
 
 thread_excepthook (self, text, exc)
 

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", )
 

Detailed Description

Publishes messages to ROS topics.

Definition at line 765 of file outputs.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  args = None,
**  kwargs 
)
@param   args                   arguments as namespace or dictionary, case-insensitive
@param   args.live              whether reading messages from live ROS topics
@param   args.queue_size_out    publisher queue size (default 10)
@param   args.publish_prefix    output topic prefix, prepended to input topic
@param   args.publish_suffix    output topic suffix, appended to output topic
@param   args.publish_fixname   single output topic name to publish to,
                                overrides prefix and suffix if given
@param   args.meta              whether to emit metainfo
@param   args.verbose           whether to emit debug information
@param   kwargs                 any and all arguments as keyword overrides, case-insensitive

Reimplemented from Sink.

Definition at line 772 of file outputs.py.

Member Function Documentation

◆ bind()

bind (   self,
  source 
)
Attaches source to sink and blocks until connected to ROS.

Reimplemented from Sink.

Definition at line 812 of file outputs.py.

◆ close()

close (   self)
Shuts down publishers.

Reimplemented from Sink.

Definition at line 836 of file outputs.py.

◆ emit()

emit (   self,
  topic,
  msg,
  stamp = None,
  match = None,
  index = None 
)
Publishes message to output topic.

Reimplemented from Sink.

Definition at line 790 of file outputs.py.

◆ validate()

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 818 of file outputs.py.

Member Data Documentation

◆ DEFAULT_ARGS

DEFAULT_ARGS
static
Initial value:
= dict(LIVE=False, META=False, QUEUE_SIZE_OUT=10, PUBLISH_PREFIX="",
PUBLISH_SUFFIX="", PUBLISH_FIXNAME="", VERBOSE=False)

Constructor argument defaults.

Definition at line 769 of file outputs.py.

◆ valid

valid

Definition at line 833 of file outputs.py.


The documentation for this class was generated from the following file: