Example #1
0
def ReturnField():
    global phase
    if mot.isWalking():
        # ..search for a ball
        if vis.scanCircle(visThread, 0.2):
            phase = 'BallFound'
    else:
        phase = 'BallNotFound'
Example #2
0
def ReturnField():
    # and while you're walking forward..
    global phase
    if mot.isWalking():
        # ..search for a ball
        if vis.scanCircle(visThread):
            phase = "BallFound"
    else:
        phase = "BallNotFound"
Example #3
0
def Unpenalized():
    global phase
    global playertype

    memProxy.insertListData([['dntBallDist', '', 0], ['dntPhase', 'ReturnField', 0]])

    # if case this nao is a keeper, convert to player until state changes to initial/ready/set, where it is set to keeper again
    playertype = 0
    
    visThread.startScan()
    # so no matter what, it's always good to walk forward (2 meters, to the center of the field)
    if not(mot.isWalking()):
        mot.postWalkTo(2, 0, 0)
    phase = 'ReturnField'
Example #4
0
def Unpenalized():
    """When unpenalized, a player starts at the side of the field
    """
    global phase
    global playertype

    memProxy.insertListData([["dntBallDist", "", 0], ["dntPhase", "ReturnField", 0]])

    # if case this nao is a keeper, convert to player until state changes to initial/ready/set, where it is set to keeper again
    playertype = 0

    visThread.startScan()
    # so no matter what, it's always good to walk forward (2 meters, to the center of the field)
    if not (mot.isWalking()):
        mHandler.postWalkTo(2, 0, 0)
    phase = "ReturnField"