KNI.pushMovementToStack(m, stackname) raw_input("Press [ENTER] to store fourth 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 fifth and last 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 fix robot.") KNI.allMotorsOn() raw_input("Press [ENTER] to loop through the point list robot.") repetitions = int(raw_input("How many repetitions? ")) KNI.runThroughMovementStack(stackname, repetitions) KNI.executeMovement(home) KNI.allMotorsOff() #############################################################################################
def switch_auto(self): """Resumes normal (driven-mode) operation of the robot.""" if not self._motors_on and KNI.allMotorsOn() == -1: raise SpineError('failed to switch motors on') self._motors_on = True