diff --git a/ground_station/resources/core/mapping.py b/ground_station/resources/core/RoverMap.py similarity index 100% rename from ground_station/resources/core/mapping.py rename to ground_station/resources/core/RoverMap.py diff --git a/ground_station/resources/core/RoverMapCoordinator.py b/ground_station/resources/core/RoverMapCoordinator.py index c72001e..2543356 100644 --- a/ground_station/resources/core/RoverMapCoordinator.py +++ b/ground_station/resources/core/RoverMapCoordinator.py @@ -8,7 +8,7 @@ import logging import rospy # Custom Imports -import MapHelper +import RoverMap ##################################### # Global Variables @@ -23,4 +23,32 @@ class RoverMapCoordinator(QtCore.QThread): super(RoverMapCoordinator, self).init() self.shared_objects = shared_objects - self.right_screen = self.shared_objects["screens"]["left_screen"] \ No newline at end of file + self.right_screen = self.shared_objects["screens"]["left_screen"] + + self.setings = QtCore.QSettings() + + self.logger = logging.getLogger("groundstation") + + self.run_thread_flag = True + self.setup_map_flag = True + + # setup map + self._get_map() + self._setup_map_threads() + + def run(self): + self.logger.debug("Starting Map Coordinator Thread") + + while self.run_thread_flag: + self.msleep(10) + + self.__wait_for_map_thread() + self.logger.debug("Stopping Map Coordinator Thread") + + def __wait_for_map_thread(self): + self.map_thread.wait() + + def _setup_map_threads(self): + self.map_thread = RoverMap.GMapsStitcher(2000, + 2000, 44.567161, -123.278432, + 18, 'terrain', None, 20) diff --git a/ground_station/resources/core/MapHelper.py b/ground_station/resources/core/RoverMapHelper.py similarity index 100% rename from ground_station/resources/core/MapHelper.py rename to ground_station/resources/core/RoverMapHelper.py