Пример #1
0
# --------- Initialize drone
drone = tello_drone()

# --------- Initiliaze dict
dict = DotMap()
dict.stat_path = stat_path
dict.network_path = network_path
dict.agent = agent
dict.target_agent = target_agent
dict.data_tuple = data_tuple
dict.data_path = data_path
dict.stat = stat
dict.stat = stat
dict.load_path = cfg.load_data_path
dict.Replay_memory = ReplayMemory
just_begin = True
# I am running the code on two platforms. My MacBook is much slower
# than my GPU installed windows laptop, hence higher skip_frame
if platform == 'win32':
    skip_frame = 60
elif platform == 'darwin':
    skip_frame = 150

if __name__ == '__main__':
    screen = drone.pygame_connect(960, 720)
    container, drone_handle = drone.connect()
    manual = True
    frame_skip = skip_frame
    while True:
        # flightDataHandler()