Script execution
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user