コード例 #1
0
ファイル: kni_demo.py プロジェクト: JakaCikac/katana_300_ros
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()

#############################################################################################
コード例 #2
0
ファイル: __init__.py プロジェクト: Dfred/concept-robot
 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