Launching RoverVideeoCoordinator. Added working logging system and set up QSettings instance

This commit is contained in:
2018-01-23 10:22:56 -08:00
parent 60ea2d9339
commit 6270f7380f
6 changed files with 318 additions and 19 deletions

View File

@@ -24,9 +24,9 @@ FONT = cv2.FONT_HERSHEY_TRIPLEX
#####################################
# RoverVideoReceiver Class Definition
#####################################
class RoverVideoReceiver(QtCore.QThread):
class RoverVideoCoordinator(QtCore.QThread):
def __init__(self, shared_objects):
super(RoverVideoReceiver, self).__init__()
super(RoverVideoCoordinator, self).__init__()
# ########## Reference to class init variables ##########
self.shared_objects = shared_objects
@@ -47,12 +47,22 @@ class RoverVideoReceiver(QtCore.QThread):
def run(self):
self.logger.debug("Starting Video Coordinator Thread")
topics = rospy.get_published_topics("/cameras")
for group in topics:
main_topic = group[0]
last_section_topic = main_topic.split("/")[-1]
if "image_" in main_topic and "zed" not in main_topic and last_section_topic == "compressed" :
print group[0]
while self.run_thread_flag:
self.msleep(100)
self.logger.debug("Stopping Video Coordinator Thread")
def _get_cameras(self):
def connect_signals_and_slots(self):
pass

View File

@@ -50,12 +50,6 @@ class RoverVideoReceiver(QtCore.QThread):
# self.video_subscriber = rospy.Subscriber(self.topic_path, CompressedImage,
# self.__image_data_received_callback) # type: rospy.Subscriber
topics = rospy.get_published_topics(self.topic_path)
for group in topics:
if "image_" in group[0]:
print group[0]
self.subscription_queue_size = 10
# Steam name variable
@@ -103,7 +97,6 @@ class RoverVideoReceiver(QtCore.QThread):
self.image_ready_signal.emit()
self.new_frame = False
def __on_image_update_ready(self):
self.video_display_label.setPixmap(self.pixmap)