Пример #1
0
Файл: nav.py Проект: parai/moped
def auto():
    # I'd like to light LEDs here, but maybe the LEDlight plugin
    # hasn't started yet.
    driving.drive(0)
    while not g.ground_control:
        time.sleep(3)
    driving.steer(70)
    time.sleep(0.5)
    driving.steer(-70)
    m3(0.4)
    while True:
        ang = g.ang%360
        if ang > 180:
            ang -= 360
        print("pos %f %f %f" % (g.ppx, g.ppy, ang))
        if (abs(g.ppx-2.5) < 0.5 and
            abs(g.ppy-14.2) < 0.5 and
            abs(ang) < 30):
            break
        time.sleep(1)

    driving.steer(0)
    m1()
    nav1.whole4()

    while True:
        time.sleep(100)
Пример #2
0
def go1():
    g.lev = 0
    print((g.ppx, g.ppy, g.ang % 360))
    g.goodmarkers = [(7, 'all', 0.6), (25, 'all', 0.6), (22, 'all', 0.65),
                     (2, 'all', 0.45)]
    g.goodmarkers = []
    nav1.whole4()
Пример #3
0
def auto():
    # I'd like to light LEDs here, but maybe the LEDlight plugin
    # hasn't started yet.
    driving.drive(0)
    while not g.ground_control:
        time.sleep(3)
    driving.steer(70)
    time.sleep(0.5)
    driving.steer(-70)
    m3(0.4)
    while True:
        ang = g.ang%360
        if ang > 180:
            ang -= 360
        print("pos %f %f %f" % (g.ppx, g.ppy, ang))
        if (abs(g.ppx-2.5) < 0.5 and
            abs(g.ppy-14.2) < 0.5 and
            abs(ang) < 30):
            break
        time.sleep(1)

    driving.steer(0)
    m1()
    nav1.whole4()

    while True:
        time.sleep(100)
Пример #4
0
Файл: nav.py Проект: parai/moped
def go1():
    g.lev=0
    print((g.ppx, g.ppy, g.ang%360))
    g.goodmarkers=[(7, 'all', 0.6), (25, 'all', 0.6), (22, 'all', 0.65), (2, 'all', 0.45)]
    g.goodmarkers=[]
    nav1.whole4()