Ejemplo n.º 1
0
        guard = DroneGuard()
    else:
        guard = None

    runner = Runner(runner_config,
                    world,
                    predictor,
                    controller,
                    guard=guard,
                    learning_enabled=args.learn,
                    target_y=args.target_y,
                    final_target_y=args.final_target_y)

    runner.addLogger(ConsoleLogger(logger_config))
    if args.log:
        runner.addLogger(CsvLogger(logger_config, args.log))

    world.setup()
    world.setInitY(args.init_y)

    runner.newRun()

    while True:
        try:
            runner.tick()

        except Exception as e:
            print e
            runner.world.terminate()
            sys.exit()
Ejemplo n.º 2
0
        guard = CopterGuard()
    elif args.guard == "drone":
        guard = DroneGuard()
    else:
        guard = None

    runner = Runner(runner_config,
                    world, predictor, controller,
                    guard=guard,
                    learning_enabled=args.learn,
                    target_y=args.target_y,
                    final_target_y=args.final_target_y)

    runner.addLogger(ConsoleLogger(logger_config))
    if args.log:
        runner.addLogger(CsvLogger(logger_config, args.log))

    world.setup()
    world.setInitY(args.init_y)

    runner.newRun()

    while True:
        try:
            runner.tick()

        except Exception as e:
            print e
            runner.world.terminate()
            sys.exit()