def main(args):
    env_id = 'fwmav_hover-v0'
    env = DummyVecEnv([make_env(env_id, 0, random_init=args.rand_init, randomize_sim=args.rand_dynamics, phantom_sensor=args.phantom_sensor)])
    if ((args.model_type != 'PID') and (args.model_type != 'ARC')):
        try:
            model_cls = getattr(importlib.import_module('stable_baselines'), args.model_type)
        except AttributeError:
            print(args.model_type, 'Error: wrong model type')
            return
        try:
            model = model_cls.load(args.model_path)
        except:
            print(args.model_path, 'Error: wrong model path')
    else:
        model = LazyModel(env.envs[0], args.model_type)
    obs = env.reset()
    while True:
        if (env.envs[0].is_sim_on == False):
            env.envs[0].gui.cv.wait()
        elif env.envs[0].is_sim_on:
            (action, _) = model.predict(obs)
            (obs, rewards, done, info) = env.step(action)
def main(args):
    env_id = 'fwmav_hover-v0'
    env = DummyVecEnv([make_env(env_id, 0, random_init=args.rand_init, randomize_sim=args.rand_dynamics, phantom_sensor=args.phantom_sensor)])
    if ((args.model_type != 'PID') and (args.model_type != 'ARC')):
        try:
            model_cls = getattr(importlib.import_module('stable_baselines'), args.model_type)
        except AttributeError:
            print(args.model_type, 'Error: wrong model type')
            return
        try:
            model = model_cls.load(args.model_path)
        except:
            print(args.model_path, 'Error: wrong model path')
    else:
        model = LazyModel(env.envs[0], args.model_type)
    obs = env.reset()
    while True:
        if (env.envs[0].is_sim_on == False):
            env.envs[0].gui.cv.wait()
        elif env.envs[0].is_sim_on:
            (action, _) = model.predict(obs)
            (obs, rewards, done, info) = env.step(action)