Script execution

This commit is contained in:
gac-S_Changer
2017-02-22 16:07:55 +01:00
parent f6b212d2ae
commit 6df21fee0c

View File

@@ -93,12 +93,21 @@ class RobotTCP(TcpDevice):
def eval_int(self, cmd):
ret = self.execute('eval', "n=" + cmd)
if ret.strip() != "":
raise Exception(ret)
if ret.strip() != "": raise Exception(ret)
return self.get_int()
def get_move_id():
self.eval_int("getMoveId()")
def eval_float(self, cmd):
ret = self.execute('eval', "n=" + cmd)
if ret.strip() != "": raise Exception(ret)
return self.get_get_float()
def get_move_id(self):
return self.eval_int("getMoveId()")
def get_joint_forces(self):
robot_tcp.evaluate("getJointForce(arr)")
return robot_tcp.get_float_arr(6)
def mount(self, puck, sample):
return self.execute('mount', puck, sample)