Commit 01cc68f0039c8582110efea6ee8680325e6df339
1 parent
430847f0
Exists in
master
ADD: reset robot processing
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
invesalius/gui/task_navigator.py
... | ... | @@ -1489,6 +1489,7 @@ class MarkersPanel(wx.Panel): |
1489 | 1489 | |
1490 | 1490 | m_target_robot = self.robot_markers[self.lc.GetFocusedItem()].robot_target_matrix |
1491 | 1491 | |
1492 | + Publisher.sendMessage('Reset robot process') | |
1492 | 1493 | Publisher.sendMessage('Robot target matrix', robot_tracker_flag=True, m_change_robot_to_head=m_target_robot) |
1493 | 1494 | |
1494 | 1495 | def OnDeleteAllMarkers(self, evt=None): | ... | ... |
invesalius/navigation/robot.py
... | ... | @@ -51,6 +51,7 @@ class Robot(): |
51 | 51 | Publisher.subscribe(self.OnSendCoordinates, 'Send coord to robot') |
52 | 52 | Publisher.subscribe(self.OnUpdateRobotTargetMatrix, 'Robot target matrix') |
53 | 53 | Publisher.subscribe(self.OnObjectTarget, 'Coil at target') |
54 | + Publisher.subscribe(self.OnResetProcessTracker, 'Reset robot process') | |
54 | 55 | |
55 | 56 | def OnRobotConnection(self): |
56 | 57 | if not self.tracker.trk_init[0][0] or not self.tracker.trk_init[1][0]: |
... | ... | @@ -82,7 +83,9 @@ class Robot(): |
82 | 83 | |
83 | 84 | def StopRobotThreadNavigation(self): |
84 | 85 | self.thread_robot.join() |
85 | - #TODO: initialize process_tracker every time a "send coordinates to robot" is requested | |
86 | + self.OnResetProcessTracker() | |
87 | + | |
88 | + def OnResetProcessTracker(self): | |
86 | 89 | self.process_tracker.__init__() |
87 | 90 | |
88 | 91 | def OnSendCoordinates(self, coord): | ... | ... |