diff --git a/invesalius/gui/task_navigator.py b/invesalius/gui/task_navigator.py index d222f14..4a49aa1 100644 --- a/invesalius/gui/task_navigator.py +++ b/invesalius/gui/task_navigator.py @@ -1489,6 +1489,7 @@ class MarkersPanel(wx.Panel): m_target_robot = self.robot_markers[self.lc.GetFocusedItem()].robot_target_matrix + Publisher.sendMessage('Reset robot process') Publisher.sendMessage('Robot target matrix', robot_tracker_flag=True, m_change_robot_to_head=m_target_robot) def OnDeleteAllMarkers(self, evt=None): diff --git a/invesalius/navigation/robot.py b/invesalius/navigation/robot.py index f7c7444..6cacc72 100644 --- a/invesalius/navigation/robot.py +++ b/invesalius/navigation/robot.py @@ -51,6 +51,7 @@ class Robot(): Publisher.subscribe(self.OnSendCoordinates, 'Send coord to robot') Publisher.subscribe(self.OnUpdateRobotTargetMatrix, 'Robot target matrix') Publisher.subscribe(self.OnObjectTarget, 'Coil at target') + Publisher.subscribe(self.OnResetProcessTracker, 'Reset robot process') def OnRobotConnection(self): if not self.tracker.trk_init[0][0] or not self.tracker.trk_init[1][0]: @@ -82,7 +83,9 @@ class Robot(): def StopRobotThreadNavigation(self): self.thread_robot.join() - #TODO: initialize process_tracker every time a "send coordinates to robot" is requested + self.OnResetProcessTracker() + + def OnResetProcessTracker(self): self.process_tracker.__init__() def OnSendCoordinates(self, coord): -- libgit2 0.21.2