ac.py
Go to the documentation of this file.
1 import pyrealsense2 as rs
2 from time import sleep
3 
4 status_list = []
5 
6 # Functions for using status list
8  global status_list
9  return not status_list
10 
12  global status_list
13  status_list = []
14 
15 # Call back function for testing status sequences
16 def status_list_callback( status ):
17  global status_list
18  status_list.append(status)
19 
20 # Removes irrelevant statuses from status list
21 def trim_irrelevant_statuses(irrelevant_statuses):
22  global status_list
23  for irrelevant_status in irrelevant_statuses:
24  # Each status could appear multiple times in the status list, we remove all appearances
25  while irrelevant_status in status_list:
26  status_list.remove(irrelevant_status)
27 
28 # Waits for calibration to end by checking last status call-back
30  global status_list
31  while status_list[-1] != rs.calibration_status.successful and status_list[-1] != rs.calibration_status.failed:
32  sleep(1)
33  return status_list[-1]
def reset_status_list()
Definition: ac.py:11
def status_list_callback(status)
Definition: ac.py:16
def trim_irrelevant_statuses(irrelevant_statuses)
Definition: ac.py:21
def wait_for_calibration()
Definition: ac.py:29
def status_list_is_empty()
Definition: ac.py:7


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Thu Dec 22 2022 03:41:41