Beispiel #1
0
def Shift3():  # 5
    # Move All the Leg Backwards
    for i in range(1, PULLFRONT_Y):
        leg.goToXYZ(SPACING_X, Y2 - i, LEG_HEIGHT, leg.LEG_A)
        leg.goToXYZ(SPACING_X, Y3 - i, LEG_HEIGHT, leg.LEG_B)
        leg.goToXYZ(SPACING_X, -Y3 - i, LEG_HEIGHT, leg.LEG_C)
        leg.goToXYZ(SPACING_X, Y1 - i, LEG_HEIGHT, leg.LEG_D)
        time.sleep(PULLFRONT_DELAY)
Beispiel #2
0
def Step2():  # 3
    readyStep2()
    # Pickup Leg D and Step Forward

    # Pickup
    leg.goToXYZ(SPACING_X, -Y2, PICKUP_Z, leg.LEG_D)
    time.sleep(ROTATION_DELAY)
    # Rotate To Location Above the Target Y
    leg.goToXYZ(SPACING_X, Y1, PICKUP_Z, leg.LEG_D)
    time.sleep(ROTATION_DELAY)
    # Drop off the Leg
    leg.goToXYZ(SPACING_X, Y1, LEG_HEIGHT, leg.LEG_D)
    time.sleep(ROTATION_DELAY)
Beispiel #3
0
def Step3():  # 4
    # Pickup Leg A and Step Forward

    # Pickup
    leg.goToXYZ(SPACING_X, -Y1, PICKUP_Z, leg.LEG_A)
    time.sleep(ROTATION_DELAY)
    # Rotate To Location Above the Target Y
    leg.goToXYZ(SPACING_X, Y2, PICKUP_Z, leg.LEG_A)
    time.sleep(ROTATION_DELAY)
    # Drop off the Leg
    leg.goToXYZ(SPACING_X, Y2, LEG_HEIGHT, leg.LEG_A)
    time.sleep(ROTATION_DELAY)

    Shift3()
Beispiel #4
0
def Step1():  # 1
    readyStep1()
    # Pickup Leg B and Step Forward

    # Pickup
    leg.goToXYZ(SPACING_X, -Y1, PICKUP_Z, leg.LEG_B)
    time.sleep(ROTATION_DELAY)
    # Rotate To Location Above the Target Y
    leg.goToXYZ(SPACING_X, Y3, PICKUP_Z, leg.LEG_B)
    time.sleep(ROTATION_DELAY)
    # Drop off the Leg
    leg.goToXYZ(SPACING_X, Y3, LEG_HEIGHT, leg.LEG_B)
    time.sleep(ROTATION_DELAY)

    Shift1()
Beispiel #5
0
import pablo as arm

import time as e

if __name__ == "__main__":
    arm.init()
    t = 0
    while (1):

        while (t < 4):
            arm.goToXYZ(2, t, -8, 0)
            t += 0.5
            print(t)
            input()

        while (t > 0):
            arm.goToXYZ(2, t, -8, 0)
            t -= 0.5
            print(t)
            input()
Beispiel #6
0
def readyStep2():
    # Ready For the Next Step
    leg.goToXYZ(SPACING_X, -Y1, LEG_HEIGHT, leg.LEG_A)
    leg.goToXYZ(SPACING_X, Y3, LEG_HEIGHT, leg.LEG_B)
    leg.goToXYZ(SPACING_X, -Y3, LEG_HEIGHT, leg.LEG_C)
    leg.goToXYZ(SPACING_X, -Y2, LEG_HEIGHT, leg.LEG_D)
Beispiel #7
0
def readyStep1():  # 7     ----->Home Position
    leg.goToXYZ(SPACING_X, Y3, LEG_HEIGHT, leg.LEG_A)
    leg.goToXYZ(SPACING_X, -Y1, LEG_HEIGHT, leg.LEG_B)
    leg.goToXYZ(SPACING_X, Y1, LEG_HEIGHT, leg.LEG_C)
    leg.goToXYZ(SPACING_X, -Y3, LEG_HEIGHT, leg.LEG_D)
Beispiel #8
0
def goToInitialPosition():
    leg.goToXYZ(SPACING_X, Y3, LEG_HEIGHT, leg.LEG_A)
    leg.goToXYZ(SPACING_X, -Y1, LEG_HEIGHT, leg.LEG_B)
    leg.goToXYZ(SPACING_X, Y1, LEG_HEIGHT, leg.LEG_C)
    leg.goToXYZ(SPACING_X, -Y3, LEG_HEIGHT, leg.LEG_D)