diff --git a/script/local.py b/script/local.py index 776f5d7..5cfa75f 100644 --- a/script/local.py +++ b/script/local.py @@ -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)