Exemplo n.º 1
0
    coachproxy = ALProxy("ALMemory", coachIP, 9559)
except:
    print "Coach not available, ip" + coachIP

# Creating classes: Protocol is first three letters with exception gameStateController (gsc)
# Motion class: motion functions etc.
mot = motions.Motions(motProxy, posProxy)

# VisionInterface class: goalscans, ballscans
vis = visionInterface.VisionInterface(motProxy, vidProxy, memProxy)
# Start the vision (ballfinding) thread
visThread = visionInterface.VisionThread(vis)
visThread.start()

# stateController class: robot state, penalized, etc.
gsc = gameStateController.stateController("stateController", ttsProxy, memProxy)

# kalmanFilter class: a kalman filter to keep track of the ballposition
kalmanFilterBall = kalman.KalmanBall()
# control vector containing x,y,theta-velocity
control = [0, 0, 0]
# ball location(s)
ball_loc = dict()

# particleFilter   = particle.ParticleFilter()
# particleFilter.start()


# Initialization of state and phase , defining gameState and robotPhase
state = 0
phase = "BallNotFound"
Exemplo n.º 2
0
# Use the chin camera
vidProxy.setParam(18,1)

# Dictionary that stores if a phase has been called once already.
firstCall = {'Initial' : True, 
             'Ready' : True, 
             'Set': True, 
             'Playing': True, 
             'Penalized': True, 
             'BallFoundKeep' : True,
             'BallNotFoundKeep' : True,
             'BallFound' : True,
             'BallNotFound' : True}

# Gamecontroller
sc = gameStateController.stateController('stateController')

# Robots own variables
robot = sc.getRobotNumber()

# Local memProxy for storing information (coaching)
memProxy = ALProxy('ALMemory', '127.0.0.1', 9559)
memProxy.insertListData([['dntBallDist', '', 0], ['dntPhase', 0, 0], ['dntNaoNum', robot, 0]])

# specify the coach here!
try:
   coachproxy = ALProxy('ALMemory', '192.168.1.14', 9559)
except: 
    pass
    
# If keeper -> different style of play
Exemplo n.º 3
0
Arquivo: soul.py Projeto: Haya1/Master
    coachproxy = ALProxy('ALMemory', coachIP, 9559)
except:
    print 'Coach not available, ip' + coachIP

# Creating classes: Protocol is first three letters with exception gameStateController (gsc)
# Motion class: motion functions etc.
mot = motions.Motions(motProxy, posProxy)

# VisionInterface class: goalscans, ballscans
vis = visionInterface.VisionInterface(motProxy, vidProxy, memProxy)
# Start the vision (ballfinding) thread
visThread = visionInterface.VisionThread(vis)
visThread.start()

# stateController class: robot state, penalized, etc.
gsc = gameStateController.stateController('stateController', ttsProxy,
                                          memProxy)

# kalmanFilter class: a kalman filter to keep track of the ballposition
kalmanFilterBall = kalman.KalmanBall()
# control vector containing x,y,theta-velocity
control = [0, 0, 0]
# ball location(s)
ball_loc = dict()

#particleFilter   = particle.ParticleFilter()
#particleFilter.start()

# Initialization of state and phase , defining gameState and robotPhase
state = 0
phase = 'BallNotFound'