Esempio n. 1
0
    def __init__(self, *args, **kwargs):
        super(Ros3DdevControllerService, self).__init__(*args, **kwargs)

        self.logger.debug('loading controller configuration from %s',
                          self.options.config_file)
        self.config = ControllerConfigLoader(self.options.config_file)
        self.logger.debug('loading system configuration from %s',
                          self.options.system_config_file)
        self.system_config = SystemConfigLoader(self.options.system_config_file)

        self.controller = Controller()
        self.controller.set_snapshots_location(self.config.get_snapshots_location())
Esempio n. 2
0
class Ros3DdevControllerService(VService):
    """Ros3D device controller services wrapper"""

    system_config_file = option(default=SystemConfigLoader.DEFAULT_PATH,
                                help='Ros3D system configuration file')
    config_file = option(default=ControllerConfigLoader.DEFAULT_PATH,
                         help='Ros3D controller configuration file')

    def __init__(self, *args, **kwargs):
        super(Ros3DdevControllerService, self).__init__(*args, **kwargs)

        self.logger.debug('loading controller configuration from %s',
                          self.options.config_file)
        self.config = ControllerConfigLoader(self.options.config_file)
        self.logger.debug('loading system configuration from %s',
                          self.options.system_config_file)
        self.system_config = SystemConfigLoader(self.options.system_config_file)

        self.controller = Controller()
        self.controller.set_snapshots_location(self.config.get_snapshots_location())

    def initLogging(self):
        """Setup logging to stderr"""
        logging.basicConfig(level=self.loglevel, stream=sys.stderr,
                            format='%(thread)d %(asctime)s - %(name)s - %(levelname)s - %(message)s')

        captureWarnings(True)