|
|
|
@ -23,12 +23,12 @@ class Candybot:
|
|
|
|
|
|
|
|
|
|
#Async Motion Params Setting
|
|
|
|
|
dType.SetHOMEParams(self.api, 250, 0, 50, 0, isQueued = 1)
|
|
|
|
|
dType.SetJOGJointParams(self.api, 50, 50, 50, 50, 50, 50, 50, 50, isQueued = 1)
|
|
|
|
|
dType.SetJOGJointParams(self.api, 200, 200, 200, 200, 200, 200, 200, 200, isQueued = 1)
|
|
|
|
|
dType.SetJOGCommonParams(self.api, 100, 100, isQueued = 1)
|
|
|
|
|
|
|
|
|
|
#linear rail
|
|
|
|
|
dType.SetDeviceWithL(self.api, 1)
|
|
|
|
|
dType.SetJOGLParams(self.api, 50, 50, isQueued=0)
|
|
|
|
|
dType.SetJOGLParams(self.api, 200, 200, isQueued=0)
|
|
|
|
|
|
|
|
|
|
#Async Home
|
|
|
|
|
dType.SetHOMECmd(self.api, temp = 0, isQueued = 1)
|
|
|
|
@ -47,6 +47,8 @@ class Candybot:
|
|
|
|
|
else :
|
|
|
|
|
return
|
|
|
|
|
threading.Timer(0.1,self.stop).start()
|
|
|
|
|
#dType.SetWAITCmd(self.api, 1, isQueued=0)
|
|
|
|
|
#dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
|
|
|
|
|
def rearArm(self, direction):
|
|
|
|
|
if direction == 1:
|
|
|
|
@ -57,8 +59,9 @@ class Candybot:
|
|
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
return
|
|
|
|
|
dType.SetWAITCmd(api, 1, isQueued=0)
|
|
|
|
|
#threading.Timer(0.1,self.stop).start()
|
|
|
|
|
#dType.SetWAITCmd(self.api, 1, isQueued=0)
|
|
|
|
|
#dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
threading.Timer(0.1,self.stop).start()
|
|
|
|
|
|
|
|
|
|
def forearm(self, direction):
|
|
|
|
|
if direction == 1:
|
|
|
|
@ -69,8 +72,9 @@ class Candybot:
|
|
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
return
|
|
|
|
|
dType.SetWAITCmd(api, 1, isQueued=0)
|
|
|
|
|
#threading.Timer(0.1,self.stop).start()
|
|
|
|
|
#dType.SetWAITCmd(self.api, 1, isQueued=0)
|
|
|
|
|
#dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
threading.Timer(0.1,self.stop).start()
|
|
|
|
|
|
|
|
|
|
def gripperRotation(self, direction):
|
|
|
|
|
if direction == 1:
|
|
|
|
@ -81,8 +85,9 @@ class Candybot:
|
|
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
return
|
|
|
|
|
dType.SetWAITCmd(api, 1, isQueued=0)
|
|
|
|
|
#threading.Timer(0.1,self.stop).start()
|
|
|
|
|
#dType.SetWAITCmd(self.api, 1, isQueued=0)
|
|
|
|
|
#dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
threading.Timer(0.1,self.stop).start()
|
|
|
|
|
|
|
|
|
|
def linear(self, direction):
|
|
|
|
|
if direction == 1:
|
|
|
|
@ -93,12 +98,21 @@ class Candybot:
|
|
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
return
|
|
|
|
|
dType.SetWAITCmd(api, 1, isQueued=0)
|
|
|
|
|
#threading.Timer(0.1,self.stop).start()
|
|
|
|
|
#dType.SetWAITCmd(self.api, 1, isQueued=0)
|
|
|
|
|
#dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
threading.Timer(0.1,self.stop).start()
|
|
|
|
|
|
|
|
|
|
def gripp(self):
|
|
|
|
|
dType.SetEndEffectorGripper(self.api, 1, 1, isQueued=0)
|
|
|
|
|
|
|
|
|
|
def letgo(self):
|
|
|
|
|
dType.SetEndEffectorGripper(self.api, 1, 0, isQueued=0)
|
|
|
|
|
|
|
|
|
|
def stop(self):
|
|
|
|
|
dType.SetJOGCmd(self.api, 1, 0)
|
|
|
|
|
|
|
|
|
|
def stopcmp(self):
|
|
|
|
|
dType.SetEndEffectorGripper(self.api, 0, 0, isQueued=0)
|
|
|
|
|
|
|
|
|
|
def panic(self):
|
|
|
|
|
dType.SetQueuedCmdForceStopExec(self.api)
|