Example #1
0
def main():
    arm.open()
    arm.down()
    arm.close()
    arm.up()
    nav.followCoordinatePath(M07)
    arm.down()
    arm.open()
    arm.up()
    arm.close()
    arm.down()
    arm.up()
    nav.returnToStart(M07)
Example #2
0
def main():
    arm.close()
    arm.up()
    advnav.followCoordinatePath([
        # Vector(140, 16),
        Vector(155, 25),
    ])
    advnav.turnToLookingDirection(Vector(11, 37).normalize())
    advnav.driveDistance(11.5, 50)
    arm.down()
    time.sleep(2)
    arm.up()
    advnav.driveDistance(-10)
    advnav.turn(-85)
    advnav.driveDistance(200)
Example #3
0
def driveToFireTruck():
    arm.close()
    arm.up()
    nav.driveDistance(100, 300)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)
    nav.turn(90)
    nav.driveDistance(8, 300)
    nav.turn(-90)
    nav.driveDistance(30, 300)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)
    nav.turn(-45)
    nav.driveDistance(25, 300)
    nav.turn(-80)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)
    nav.driveDistance(-5, 300)
    arm.open()
    arm.down()
    arm.close()
    arm.up()
    nav.driveDistance(-20, 300)
Example #4
0
def main():
    '''arm.open()
    arm.down()
    arm.close()'''
    arm.up()
    nav.followCoordinatePath(half)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)
    nav.followCoordinatePath(secoundHalf)
    nav.turn(-50)
    nav.driveForward(500, 100)
    nav.turn(-50)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)
    #nav.followCoordinatePath(toThePlant)
    nav.driveForward(-50, 100)
    nav.turn(-50)
    nav.driveForward(200, 100)
    arm.down()
    arm.open()
    arm.up()
    arm.close()
    arm.down()
    arm.up()
    nav.returnToStart(M07)
def do_init_seq():
  doseq(initseq)

def initptu():
  return ptu.initptu()

if __name__ == '__main__':
#  arm.init()
#  arm.home()
  arm.init_fingers()

  if doptu:
    ptu.initptu()
    time.sleep(30)
  #ptu.pantilt([5, 0])
  #ptu.pantilt([-5, 0])
  #ptu.pantilt([0, 0])
  #ptu.pantilt([0, -5])
  #ptu.pantilt([0, 5])
  #ptu.pantilt([0, 0])

  do_init_seq()

  while True:
    do_demo_seq()
    time.sleep(5)

  arm.close()

Example #6
0
def main():

    arm.up()
    arm.close()
    nav.followCoordinatePath(M18)
    color.driveToBlack(nav.db, nav.motorWheelLeft, nav.motorWheelRight)