Ejemplo n.º 1
0
 def __init__( self ):
     brickpibot.set_speed(0)
     brickpibot.fwd()
     
     self.lastServoSettingsSendTime = 0.0
     self.lastUpdateTime = 0.0
     self.lastMotionCommandTime = time.time()
Ejemplo n.º 2
0
    def setMotorJoystickPos( self, joystickX, joystickY ):
        joystickX, joystickY = self.normaliseJoystickData( joystickX, joystickY )
        if debug:
			print "Left joy",joystickX, joystickY
			print self.speed_l*joystickY
        brickpibot.set_left_speed(int(self.speed_l*joystickY))
        brickpibot.fwd()
Ejemplo n.º 3
0
    def setNeckJoystickPos( self, joystickX, joystickY ):
        #print "g"
        joystickX, joystickY = self.normaliseJoystickData( joystickX, joystickY )
        if debug:	
			print "Right joy",joystickX, joystickY
			print self.speed_r*joystickY
        brickpibot.set_right_speed(int(self.speed_r*joystickY))
        brickpibot.fwd()
        self.lastMotionCommandTime = time.time()