def run(self): commands.standStraight() #commands.setHeadTilt(0) commands.setHeadPan(1.5, 3) if self.getTime() > 5.0: memory.speech.say("Init head complete!") self.finish()
def run(self): memory.speech.say("I want ball!") commands.standStraight() if self.getTime() > 3.0: ball = memory.world_objects.getObjPtr(core.WO_BALL) if ball.seen: print("Ball Found at ({}, {})".format(ball.imageCenterX, ball.imageCenterY))
def run(self): if self.getTime() < 1.0: memory.speech.say("I am ready") commands.standStraight() commands.setHeadTilt(-18) # Tilt head up so we can see goal (default = -22) if self.getTime() > 2.0: commands.stand()
def run(self): # Stand straight up because the head can't move if crouching commands.standStraight() ball = memory.world_objects.getObjPtr(core.WO_BALL) if ball.seen: memory.speech.say("I see the ball!") print('Ball seen!!!!') ball_x, ball_y = ball.imageCenterX, ball.imageCenterY print('Ball seen at ({},{})'.format(ball_x, ball_y)) x_head_turn = -(ball_x - (320.0 / 2.0)) / 160.0 print('X HEAD TURN: {}'.format(x_head_turn)) commands.setHeadPan(x_head_turn) y_head_tilt = -(ball_y - (240.0 / 2.0)) / 120.0 * 30 print('Y HEAD TILT: {}'.format(y_head_tilt)) commands.setHeadTilt(y_head_tilt) else: memory.speech.say("Where's the ball!?")
def run(self): # Stand straight up because the head can't move if crouching commands.standStraight() ball = memory.world_objects.getObjPtr(core.WO_BALL) if ball.seen: memory.speech.say("I see the ball!") print('Ball seen!!!!') ball_x, ball_y = ball.imageCenterX, ball.imageCenterY print('Ball seen at ({},{})'.format(ball_x, ball_y)) x_head_turn = -(ball_x-(320.0 / 2.0)) / 160.0 print('X HEAD TURN: {}'.format(x_head_turn)) commands.setHeadPan(x_head_turn) y_head_tilt = -(ball_y-(240.0 / 2.0)) / 120.0 * 30 print('Y HEAD TILT: {}'.format(y_head_tilt)) commands.setHeadTilt(y_head_tilt) else: memory.speech.say("Where's the ball!?")
def run(self): commands.standStraight() if self.getTime() > 5.0: memory.speech.say("ready to play") self.finish()
def run(self): commands.standStraight() if self.getTime() > 1.5: self.finish()
def run(self): commands.standStraight() if self.getTime() > 3.0: memory.speech.say("I am ready") self.finish()
def run(self): commands.standStraight() if self.getTime() > 5.0: self.finish()