def init_arm(): # Just initializes the arm import os.path import conf KatHD400s_6m = __path__[0]+os.path.sep+"katana6M90T.cfg" LOG.info('trying to connect to Katana400s-6m on %s', conf.spine_hardware) if KNI.initKatana(KatHD400s_6m, conf.spine_hardware) == -1: raise SpineError('configuration file not found or' ' failed to connect to hardware', KatHD400s_6m) else: print 'loaded config file', KatHD400s_6m, 'and now connected'
# Copyright (C) 2008 Neuronics AG # PKE/JHA, 2008 ############################################################################################ """ This Skript demonstrates the use of the KNI library through the Python wrapper For API doc, read the kni_wrapper doc or the kni_wrapper.h file. """ ############################################################################################# import sys sys.path.append("../") 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()