def main():
    try:
        agent_config = AgentConfig.parse_file(Path("./ROAR_Jetson/configurations/agent_configuration.json"))
        jetson_config = JetsonConfig.parse_file(Path("./ROAR_Jetson/configurations/configuration.json"))

        try:
            prepare(jetson_config=jetson_config)
        except Exception as e:
            logging.error(f"Ignoring Error during setup: {e}")
        agent = PIDAgent(vehicle=Vehicle(), agent_settings=agent_config, should_init_default_cam=False)
        jetson_runner = JetsonRunner(agent=agent, jetson_config=jetson_config)
        jetson_runner.start_game_loop(use_manual_control=False)
    except Exception as e:
        print(f"Something bad happened {e}")
Exemple #2
0
def main():
    try:

        agent_config = AgentConfig.parse_file(
            Path("./ROAR_Jetson/configurations/agent_configuration.json"))
        jetson_config = JetsonConfig.parse_file(
            Path("./ROAR_Jetson/configurations/configuration.json"))

        prepare(jetson_config=jetson_config)
        agent = ForwardOnlyAgent(vehicle=Vehicle(),
                                 agent_settings=agent_config)
        jetson_runner = JetsonRunner(agent=agent, jetson_config=jetson_config)
        jetson_runner.start_game_loop(use_manual_control=True)
    except Exception as e:
        print(f"Something bad happened {e}")