Пример #1
0
    def __init__(self):
        """
        Constructor 
        """
        self._port = None
        self._connectionStatus = False
        self._communication = eCommunication.communication(self)

        self._movement = eMovement.movement(self)
        self._proximity =  eProximitysensor.proximitysensor(self)
        self._floor = eFloorsensor.floorsensor(self)
        self._led1 = eLed.led(self, 1)
        self._led2 = eLed.led(self, 2)
        self._led3 = eLed.led(self, 3)
        self._led4 = eLed.led(self, 4)
        self._led5 = eLed.led(self, 5)
        self._led6 = eLed.led(self, 6)
        self._led7 = eLed.led(self, 7)
        self._led8 = eLed.led(self, 8)
        self._led9 = eLed.led(self, 9)
        self._accelerometer = eAccelerometer.accelerometer(self)
        self._camera = eCamera.camera(self)
        self._firmware = eFirmware.firmwareVersion(self)
        self._lightsensor = eLightsensor.lightsensor(self)
        self._microphone = eMicrophone.microphone(self)
        self._selector = eSelector.selector(self)
Пример #2
0
    def __init__(self, bot):
        """
        Constructor 
        
        :parameter: bot
        :pType: epuck.robot
        """
        if isinstance(bot, epuck.robot):
            self._robot = bot
            self._communication = eCommunication.communication(self._robot)

            # Camera attributes
            self._cam_width = None
            self._cam_height = None
            self._cam_enable = False
            self._cam_zoom = None
            self._cam_mode = None
            self._cam_size = None
            self._pil_image = None

            self._camera_parameters = (0, 0, 0, 0)

        else:
            logging.error('Parameter has to be of type robot')
            raise ValueError("Parameter has to be of type robot")
Пример #3
0
    def __init__(self):
        """
        Constructor 
        """
        self._port = None
        self._connectionStatus = False
        self._communication = eCommunication.communication(self)

        self._movement = eMovement.movement(self)
        self._proximity = eProximitysensor.proximitysensor(self)
        self._floor = eFloorsensor.floorsensor(self)
        self._led1 = eLed.led(self, 1)
        self._led2 = eLed.led(self, 2)
        self._led3 = eLed.led(self, 3)
        self._led4 = eLed.led(self, 4)
        self._led5 = eLed.led(self, 5)
        self._led6 = eLed.led(self, 6)
        self._led7 = eLed.led(self, 7)
        self._led8 = eLed.led(self, 8)
        self._led9 = eLed.led(self, 9)
        self._accelerometer = eAccelerometer.accelerometer(self)
        self._camera = eCamera.camera(self)
        self._firmware = eFirmware.firmwareVersion(self)
        self._lightsensor = eLightsensor.lightsensor(self)
        self._microphone = eMicrophone.microphone(self)
        self._selector = eSelector.selector(self)
Пример #4
0
 def __init__(self, bot):
     """
     Constructor 
     
     :parameter: bot
     :pType: epuck.robot
     """
     if isinstance(bot, epuck.robot):
         self._robot = bot
         self._communication = eCommunication.communication(self._robot)
         
         # Camera attributes
         self._cam_width = None
         self._cam_height = None
         self._cam_enable = False
         self._cam_zoom = None
         self._cam_mode = None
         self._cam_size = None
         self._pil_image = None
         
         self._camera_parameters = (0, 0, 0, 0)
             
     else:
         logging.error('Parameter has to be of type robot')
         raise ValueError("Parameter has to be of type robot") 
Пример #5
0
 def __init__(self, bot):
     """
     Constructor 
     
     :parameter: bot
     :pType: epuck.robot
     """
     if isinstance(bot, epuck.robot):
         self._robot = bot
         self._communication = eCommunication.communication(self._robot)
     else:
         logging.error('Parameter has to be of type robot')
         raise ValueError("Parameter has to be of type robot")
Пример #6
0
 def __init__(self, bot):
     """
     Constructor 
     
     :parameter: bot
     :pType: epuck.robot
     """
     if isinstance(bot, epuck.robot):
         self._robot = bot
         self._communication = eCommunication.communication(self._robot)
     else:
         logging.error('Parameter has to be of type robot')
         raise ValueError("Parameter has to be of type robot")
Пример #7
0
 def __init__(self, bot):
     """
     Constructor 
     
     :parameter: bot
     :pType: epuck.robot
     """
     if isinstance(bot, epuck.robot):
         self._robot = bot
         self._communication = eCommunication.communication(self._robot)
         
         # Initialize i2c bus
         self._i2cbus = i2c.I2cBus(3)
         self._i2cdev = self._i2cbus[0x60]            
                 
     else:
         logging.error('Parameter has to be of type robot')
         raise ValueError("Parameter has to be of type robot")