This commit is contained in:
@@ -23,7 +23,7 @@ joint_forces = False
|
||||
class RobotSC(RobotTCP):
|
||||
def __init__(self, name, server, timeout = 1000, retries = 1):
|
||||
RobotTCP.__init__(self, name, server, timeout, retries)
|
||||
self.set_tasks(["getDewar", "putDewar", "putGonio", "getGonio", "robotRecover", "moveDewar", "movePark", "moveGonio","moveHeater"])
|
||||
self.set_tasks(["getDewar", "putDewar", "putGonio", "getGonio", "robotRecover", "moveDewar", "movePark", "moveGonio","moveHeater", "moveScanner"])
|
||||
self.set_known_points(["pHome", "pPark", "pDewarHome", "pGonioHome", "pDewarWait", "pGonioGet", "pScanHome", "pHeaterHome"])
|
||||
self.setPolling(DEFAULT_ROBOT_POLLING)
|
||||
|
||||
@@ -55,6 +55,11 @@ class RobotSC(RobotTCP):
|
||||
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
|
||||
self.assert_gonio()
|
||||
|
||||
def move_scanner(self):
|
||||
self.start_task('moveScanner')
|
||||
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
|
||||
self.assert_scanner()
|
||||
|
||||
def move_gonio(self):
|
||||
self.start_task('moveGonio')
|
||||
self.wait_task_finished(TASK_WAIT_ROBOT_POLLING)
|
||||
@@ -133,6 +138,9 @@ class RobotSC(RobotTCP):
|
||||
|
||||
def is_gonio(self):
|
||||
return self.is_in_point("pGonioHome")
|
||||
|
||||
def is_scanner(self):
|
||||
return self.is_in_point("pScanHome")
|
||||
|
||||
def is_cleared(self):
|
||||
#return self.is_home() or self.is_park() or self.is_dewar() or self.is_dewar_home()
|
||||
@@ -156,6 +164,9 @@ class RobotSC(RobotTCP):
|
||||
def assert_gonio(self):
|
||||
self.assert_in_point("pGonioHome")
|
||||
|
||||
def assert_scanner(self):
|
||||
self.assert_in_point("pScanHome")
|
||||
|
||||
def assert_cleared(self):
|
||||
if not self.is_cleared():
|
||||
raise Exception("Robot not in cleared position")
|
||||
|
||||
Reference in New Issue
Block a user