nao.motion
Class RedBallFinder

java.lang.Object
  extended by nao.motion.RedBallFinder

public class RedBallFinder
extends java.lang.Object

Uses the in-built ball tracking to locate red balls and then attempts to align the ball ready for picking or kicking.


Constructor Summary
RedBallFinder(ExtendedNao nao)
           
 
Method Summary
 boolean alignBall(double targetX, double targetY)
          Given a visible ball, walk towards the ball and align it with the specified target point.
 boolean lookAround()
          Look around for the ball (using the head only).
 boolean wanderAround()
          Wander randomly around looking for the ball.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedBallFinder

public RedBallFinder(ExtendedNao nao)
Method Detail

lookAround

public boolean lookAround()
Look around for the ball (using the head only).

Returns:
True if the ball was seen

wanderAround

public boolean wanderAround()
Wander randomly around looking for the ball.

Returns:
True if the ball was seen

alignBall

public boolean alignBall(double targetX,
                         double targetY)
Given a visible ball, walk towards the ball and align it with the specified target point.

Parameters:
targetX - The desired X co-ordinate of the ball after alignment (in metres)
targetY - The desired Y co-ordinate of the ball after alignment (in metres)
Returns:
False if the ball was lost during alignment, true otherwise