Ejemplo n.º 1
0
 def initialize(self):
     self._factor = float(self.parameter("factor", default=1.05))
     self._gyro_drift = float(self.parameter("gyro_drift", default=0))
     self._drift_x = 0.0
     self._drift_y = 0.0
     self._drift_yaw = 0.0
     do_service_registration(self.reset_noise,
                             self.component_instance.name())
Ejemplo n.º 2
0
 def initialize(self):
     self._factor = float(self.parameter("factor", default=1.05))
     self._factor_sigma = float(self.parameter("factor_sigma", default=0))
     self._gyro_drift = float(self.parameter("gyro_drift", default=0))
     self._gyro_drift_sigma = float(self.parameter("gyro_drift_sigma", default=0))
     self._drift_x = 0.0
     self._drift_y = 0.0
     self._drift_yaw = 0.0
     do_service_registration(self.reset_noise, self.component_instance.name())
Ejemplo n.º 3
0
    def __init__(self):
        """ Initialize the socket connections """
        # Call the constructor of the parent class
        super(self.__class__,self).__init__()

        # port -> MorseSocketServ
        self._server_dict = {}

        # component name (string)  -> Port (int)
        self._component_nameservice = {}

        self._base_port = 60000

        # Register two special services in the socket service manager:

        # TODO To use a new special component instead of 'simulation',
        # uncomment the line :-)
        # bge.logic.morse_services.register_request_manager_mapping("streams", "SocketRequestManager")
        services.do_service_registration(self.list_streams, 'simulation')
        services.do_service_registration(self.get_stream_port, 'simulation')
Ejemplo n.º 4
0
    def __init__(self, args, kwargs):
        """ Initialize the socket connections """
        # Call the constructor of the parent class
        DatastreamManager.__init__(self, args, kwargs)

        self.time_sync = kwargs.get('time_sync', False)
        self.sync_port = kwargs.get('sync_port', -1)

        if self.time_sync:
            if self.sync_port == -1:
                logger.error(
                    "time_sync is required, but sync_port is not configured")
                raise MorseMiddlewareError("sync_port is not configured")
            else:
                self._init_trigger()

        # port -> MorseSocketServ
        self._server_dict = {}

        # component name (string)  -> Port (int)
        self._component_nameservice = {}

        # Base port
        self._base_port = 60000

        # Register two special services in the socket service manager:

        # TODO To use a new special component instead of 'simulation',
        # uncomment the line :-)
        # blenderapi.persistantstorage().morse_services.register_request_manager_mapping("streams", "SocketRequestManager")
        services.do_service_registration(self.list_streams, 'simulation')
        services.do_service_registration(self.get_stream_port, 'simulation')
        services.do_service_registration(self.get_all_stream_ports,
                                         'simulation')
Ejemplo n.º 5
0
    def __init__(self, args, kwargs):
        """ Initialize the socket connections """
        # Call the constructor of the parent class
        DatastreamManager.__init__(self, args, kwargs)

        self.time_sync = kwargs.get('time_sync', False)
        self.sync_port = kwargs.get('sync_port', -1)

        if self.time_sync:
            if self.sync_port == -1:
                logger.error("time_sync is required, but sync_port is not configured")
                raise MorseMiddlewareError("sync_port is not configured")
            else:
                self._init_trigger()

        # port -> MorseSocketServ
        self._server_dict = {}

        # component name (string)  -> Port (int)
        self._component_nameservice = {}

        # Base port
        self._base_port = 60000

        # Register two special services in the socket service manager:

        # TODO To use a new special component instead of 'simulation',
        # uncomment the line :-)
        # blenderapi.persistantstorage().morse_services.register_request_manager_mapping("streams", "SocketRequestManager")
        services.do_service_registration(self.list_streams, 'simulation')
        services.do_service_registration(self.get_stream_port, 'simulation')
        services.do_service_registration(self.get_all_stream_ports, 'simulation')
    def __init__(self):
        """ Initialize the socket connections """
        # Call the constructor of the parent class
        DatastreamManager.__init__(self)

        # port -> MorseSocketServ
        self._server_dict = {}

        # component name (string)  -> Port (int)
        self._component_nameservice = {}

        # Register two special services in the socket service manager:

        # TODO To use a new special component instead of 'simulation',
        # uncomment the line :-)
        # blenderapi.persistantstorage().morse_services.register_request_manager_mapping("streams", "SocketRequestManager")
        services.do_service_registration(self.list_streams, 'simulation')
        services.do_service_registration(self.get_stream_port, 'simulation')
        services.do_service_registration(self.get_all_stream_ports, 'simulation')