Public Member Functions | Public Attributes | Private Member Functions | List of all members
test_snapshot.TestRosbagSnapshot Class Reference
Inheritance diagram for test_snapshot.TestRosbagSnapshot:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args)
 
def test_1_service_connects (self)
 
def test_invalid_topics (self)
 
def test_write_advanced (self)
 
def test_write_all (self)
 

Public Attributes

 default_duration_limit
 
 default_memory_limit
 
 enable
 
 last_status
 
 params
 
 status_sub
 
 topic_limits
 
 trigger
 

Private Member Functions

def _assert_bag_valid (self, filename, topics=None, start_time=None, stop_time=None)
 
def _assert_limits_enforced (self, test_topic, duration, memory)
 
def _assert_no_data (self, topics=[])
 
def _assert_record_success (self, data)
 
def _assert_status_valid (self)
 
def _assert_write_success (self, topics=[], prefix_mode=False, kwargs)
 
def _parse_params (self, params)
 
def _pause (self)
 
def _resume (self)
 
def _status_cb (self, msg)
 

Detailed Description

Tests the "rosbag_snapshot" command.
Relies on the nodes launched in snapshot.test

Definition at line 45 of file test_snapshot.py.

Constructor & Destructor Documentation

def test_snapshot.TestRosbagSnapshot.__init__ (   self,
  args 
)

Definition at line 50 of file test_snapshot.py.

Member Function Documentation

def test_snapshot.TestRosbagSnapshot._assert_bag_valid (   self,
  filename,
  topics = None,
  start_time = None,
  stop_time = None 
)
private
Open the bagfile at the specified filename and read it to ensure topic limits were
enforced and the optional topic list and start/stop times are also enforced.

Definition at line 164 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._assert_limits_enforced (   self,
  test_topic,
  duration,
  memory 
)
private
Asserts that the measured duration and memory for a topic comply with the launch parameters
@param topic: string
@param duration: rospy.Duration, age of buffer
@param memory: integer, bytes of memory used

Definition at line 133 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._assert_no_data (   self,
  topics = [] 
)
private
Asserts that calling TriggerWrite service with
specifed parameters responds non-success and did not create
a bag file.

Definition at line 84 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._assert_record_success (   self,
  data 
)
private
Assert that the recording SetBool service responds with success

Definition at line 96 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._assert_status_valid (   self)
private
Check that a status message contains info on all subscribed topics
and reports that their buffer complies with the configured limits.

Definition at line 148 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._assert_write_success (   self,
  topics = [],
  prefix_mode = False,
  kwargs 
)
private
Asserts that the TriggerWrite services succeeds for the specified request arguments
and that the specified bag file is actually created
@param prefix_mode: If True, don't put .bag at the end of reqest to check prefix filename mode

Definition at line 110 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._parse_params (   self,
  params 
)
private
Parse launch parameters of snapshot to cache the topic limits in a map
so it is easier to check compliance in later tests.

Definition at line 59 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._pause (   self)
private

Definition at line 104 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._resume (   self)
private

Definition at line 107 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot._status_cb (   self,
  msg 
)
private

Definition at line 81 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot.test_1_service_connects (   self)
Check that both services provided by snapshot exist.

Definition at line 190 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot.test_invalid_topics (   self)
Test that an invalid topic or one not subscribed to fails

Definition at line 238 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot.test_write_advanced (   self)
Test the more advanced features: pausing and resuming, specific write times, and specific topic list.

Definition at line 206 of file test_snapshot.py.

def test_snapshot.TestRosbagSnapshot.test_write_all (   self)
Wait long enough for memory & duration limits to need to be used

Definition at line 197 of file test_snapshot.py.

Member Data Documentation

test_snapshot.TestRosbagSnapshot.default_duration_limit

Definition at line 65 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.default_memory_limit

Definition at line 66 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.enable

Definition at line 56 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.last_status

Definition at line 53 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.params

Definition at line 51 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.status_sub

Definition at line 54 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.topic_limits

Definition at line 64 of file test_snapshot.py.

test_snapshot.TestRosbagSnapshot.trigger

Definition at line 55 of file test_snapshot.py.


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


rosbag_snapshot
Author(s): Kevin Allen
autogenerated on Mon Jan 18 2021 03:45:11