Public Member Functions | |
def | __init__ |
def | add_listener |
def | bag |
def | pause |
def | paused |
def | start |
def | stop |
def | toggle_paused |
def | unpause |
Private Member Functions | |
def | _record |
def | _run_master_check |
Implementation. | |
def | _run_write |
def | _should_subscribe_to |
def | _unsubscribe |
Private Attributes | |
_all | |
_bag | |
_bag_lock | |
_failed_topics | |
_last_update | |
_limit | |
_limited_topics | |
_listeners | |
_master_check_interval | |
_master_check_thread | |
_message_count | |
_paused | |
_regex | |
_regexes | |
_stop_condition | |
_stop_flag | |
_subscriber_helpers | |
_topics | |
_write_queue | |
_write_thread |
Definition at line 48 of file recorder.py.
def rxbag.recorder.Recorder.__init__ | ( | self, | |
filename, | |||
bag_lock = None , |
|||
all = True , |
|||
topics = [] , |
|||
regex = False , |
|||
limit = 0 , |
|||
master_check_interval = 1.0 |
|||
) |
Subscribe to ROS messages and record them to a bag file. @param filename: filename of bag to write to @type filename: str @param all: all topics are to be recorded [default: True] @type all: bool @param topics: topics (or regexes if regex is True) to record [default: empty list] @type topics: list of str @param regex: topics should be considered as regular expressions [default: False] @type regex: bool @param limit: record only this number of messages on each topic (if non-positive, then unlimited) [default: 0] @type limit: int @param master_check_interval: period (in seconds) to check master for new topic publications [default: 1] @type master_check_interval: float
Definition at line 49 of file recorder.py.
def rxbag.recorder.Recorder._record | ( | self, | |
topic, | |||
m | |||
) | [private] |
Definition at line 194 of file recorder.py.
def rxbag.recorder.Recorder._run_master_check | ( | self | ) | [private] |
Implementation.
Definition at line 131 of file recorder.py.
def rxbag.recorder.Recorder._run_write | ( | self | ) | [private] |
Definition at line 206 of file recorder.py.
def rxbag.recorder.Recorder._should_subscribe_to | ( | self, | |
topic | |||
) | [private] |
Definition at line 173 of file recorder.py.
def rxbag.recorder.Recorder._unsubscribe | ( | self, | |
topic | |||
) | [private] |
Definition at line 186 of file recorder.py.
def rxbag.recorder.Recorder.add_listener | ( | self, | |
listener | |||
) |
Add a listener which gets called whenever a message is recorded. @param listener: function to call @type listener: function taking (topic, message, time)
Definition at line 98 of file recorder.py.
def rxbag.recorder.Recorder.bag | ( | self | ) |
Definition at line 96 of file recorder.py.
def rxbag.recorder.Recorder.pause | ( | self | ) |
Definition at line 115 of file recorder.py.
def rxbag.recorder.Recorder.paused | ( | self | ) |
Definition at line 114 of file recorder.py.
def rxbag.recorder.Recorder.start | ( | self | ) |
Start subscribing and recording messages to bag.
Definition at line 106 of file recorder.py.
def rxbag.recorder.Recorder.stop | ( | self | ) |
Stop recording.
Definition at line 119 of file recorder.py.
def rxbag.recorder.Recorder.toggle_paused | ( | self | ) |
Definition at line 117 of file recorder.py.
def rxbag.recorder.Recorder.unpause | ( | self | ) |
Definition at line 116 of file recorder.py.
rxbag::recorder.Recorder::_all [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_bag [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_bag_lock [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_failed_topics [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_last_update [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_limit [private] |
Definition at line 64 of file recorder.py.
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_listeners [private] |
Definition at line 64 of file recorder.py.
Definition at line 64 of file recorder.py.
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_message_count [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_paused [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_regex [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_regexes [private] |
Definition at line 64 of file recorder.py.
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_stop_flag [private] |
Definition at line 64 of file recorder.py.
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_topics [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_write_queue [private] |
Definition at line 64 of file recorder.py.
rxbag::recorder.Recorder::_write_thread [private] |
Definition at line 64 of file recorder.py.