def boot_robot_adapter_main(params):
    check_parameters(params, required=['robot_spec', 'root'],
                             optional=['maximum_interval', 'sleep'])

    data_central = DataCentral(params['root'])
    bo_config = data_central.get_bo_config()

    sleep = params.get('sleep', 0.0)
    maximum_interval = params.get('maximum_interval', 2)
    robot_spec = params['robot_spec']
#     check_valid_robot_config(robot_spec)
    robot = bo_config.robots.instance_spec(robot_spec)  # @UndefinedVariable 

    adapter = BootRobotAdapter(id_robot=robot_spec['id'],
                               robot=robot,
                              maximum_interval=maximum_interval,
                              sleep=sleep)
    adapter.loop()
def boot_agent_adapter_main(params):
    Global.logger = RospyLogger("agent_adapter")

    Global.logger.info("My params:\n%s" % pformat(params))

    check_parameters(params, required=["agent_spec", "root"], optional=["publish_interval"])

    data_central = DataCentral(params["root"])
    bo_config = data_central.get_bo_config()

    publish_interval = params.get("publish_interval", 0)
    agent_spec = params["agent_spec"]
    #     check_valid_agent_config(agent_spec)
    agent = bo_config.agents.instance_spec(agent_spec)  # @UndefinedVariable
    id_agent = agent_spec["id"]

    AgentInterface.logger = RospyLogger(id_agent)

    agent_adapter = BootAgentAdapter(
        data_central=data_central, id_agent=id_agent, agent=agent, publish_interval=publish_interval
    )

    agent_adapter.go()