import KNI from KNI import TMovement ############################################################################################# import KNI KNI.initKatana("../../configfiles450/katana6M90T.cfg", "192.168.1.1") KNI.calibrate(0) home = TMovement() KNI.getPosition(home.pos) home.transition = KNI.PTP home.velocity = 50 home.acceleration = 2 raw_input("Press [ENTER] to release robot.") KNI.allMotorsOff() stackname = "test" raw_input("Press [ENTER] to store first point (p2p movement).") m = TMovement() KNI.getPosition(m.pos) m.transition = KNI.PTP m.velocity = 50 m.acceleration = 2 KNI.pushMovementToStack(m, stackname) raw_input("Press [ENTER] to store second point (linear movement).") m = TMovement() KNI.getPosition(m.pos) m.transition = KNI.LINEAR
def switch_manual(self): """WARNING: Allow free manual handling of the robot. ALL MOTORS OFF!""" if KNI.allMotorsOff() == -1: raise SpineError('failed to switch motors off') self._motors_on = False