import Adafruit_BBIO.ADC as ADC import logging ############################### #Setup of vidro and controller# ############################### vidro = Vidro(False, 1) flight_ready = vidro.connect_vicon() vidro.connect_mavlink() controller = PositionController(vidro) start_time = time.time() #Load gains controller.update_gains() #################### # Controller Values# #################### take_off_alt = 1000 # Pos Commands alt_com = 0 # Pos Values alt_pos = 0 ############# # FSM Values# ############# sequence = 0
global frame global new_frame _, frame = cap.read() frame = cv2.flip(frame,-1,-1) new_frame = True ############################### #Setup of vidro and controller# ############################### vidro = Vidro(False, 1) flight_ready = vidro.connect() controller = PositionController(vidro) start_time = time.time() # Load gains controller.update_gains() #################### # Controller Values# #################### take_off_alt = 1000 # Pos Commands x_com = 0 y_com = 0 alt_com = 0 yaw_com = 0 # Pos Values x_pos = 0 y_pos = 0 alt_pos = 0