Exemplo n.º 1
0
    arm.SetPosition(-1, 80, -1, -1, -1, -1)
    WaitForMove()
    arm.SetPosition(6, 50, 80, 27, 85, -1)
    WaitForMove()
    arm.Gripper(20)
    WaitForMove()
    arm.SetPosition(lastpos[0], lastpos[1], lastpos[2], lastpos[3], lastpos[4],
                    lastpos[5])
    arm.MovingSpeed(5)


time.sleep(1)
stage = [[40, 65, 82, 50], [135, 50, 48, 53], [50, 30, 1, 73]]
arm.InitCom()
arm.SendMessage("nadviazane spojenie")
add = arm.GetStreamAddress()
res = arm.GetStreamResolution()
arm.InitYolo(add, "C:\\Users\mt2si\\Desktop\\ArmDemos\\syringe_obj")
arm.SendMessage("Yolo spustene")

for st in range(3):
    arm.SendMessage(st)
    arm.MovingSpeed(5)
    arm.SetPosition(stage[st][0], stage[st][1], stage[st][2], stage[st][3], 85,
                    20)
    WaitForMove()
    interupted = 0
    while (interupted == 0):
        arm.SetPosition(180 - stage[st][0], stage[st][1], stage[st][2],
                        stage[st][3], 85, 20)
        th = Thread(target=WaitForMove, args=())