iorodeo avatar iorodeo committed 51bd073 Draft

Fixed issue with frame_dog_watchdog, three_point_tracker_synchronizer, and
image_stitcher - which caused an error on reset.

Comments (0)

Files changed (4)

mct_image_stitcher/nodes/image_stitcher.py

             self.seq_to_images = {}  
             self.stamp_to_seq_pool= {}
             self.image_waiting_pool = {} 
+            self.seq_newest = None
+            self.stamp_newest = None
         return EmptyResponse()
 
     def create_camera_to_image_dict(self):

mct_tracking_2d/nodes/three_point_tracker_synchronizer.py

         Reset service handler. Empties the tracking_pts_pool.
         """
         with self.lock:
+            self.latest_seq = None
             self.tracking_pts_pool = {}
         return EmptyResponse()
 

mct_watchdog/nodes/frame_drop_watchdog.py

     def __init__(self,max_seq_age=150):
 
         rospy.init_node('frame_drop_watchdog')
+        self.max_seq_age = max_seq_age
         self.lock = threading.Lock()
+        self.frames_dropped = {}
+        self.latest_seq = None
         self.ready = False
-        self.frames_dropped = {}
-        self.max_seq_age = max_seq_age
-        self.latest_seq = None
 
         camera_assignment = file_tools.read_camera_assignment()
         self.number_of_cameras = len(camera_assignment)
         """
         with self.lock:
             self.frames_dropped = {}
+            self.latest_seq = None
         return EmptyResponse()
 
     def frames_dropped_handler(self, camera, data):

mct_web_apps/src/mct_web_apps/tracking_2d_app.py

         regions_dict = redis_tools.get_dict(db,'regions_dict')
         # Reset frame drop correctors and restart camera triggers
         frame_drop_corrector.reset_all()
+        frame_drop_watchdog.reset()
 
         # Reset image_stitcher and three_point_tracker synchronizer for all tracking regions
         for region in regions_dict:
 
         camera_trigger.start(frame_rate)
 
-        # ########################################
-        # Probably need to change this .... 
-        # ########################################
-        # Reset time stamp watchdog
-        frame_drop_watchdog.reset()
-        
-    
     # Development ----------------------------------------------------------------------------------------------
     #obj_response.html('#develop_mode_change', 'develop mode change: {0} -> {1}, {2}'.format(old_mode, new_mode))
     # ----------------------------------------------------------------------------------------------------------
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.