Ejemplo n.º 1
0
audProxy = ALProxy("ALAudioDevice", "127.0.0.1", 9559)
ledProxy = ALProxy("ALLeds", "127.0.0.1", 9559)
memProxy = ALProxy("ALMemory", "127.0.0.1", 9559)
motProxy = ALProxy("ALMotion", "127.0.0.1", 9559)
posProxy = ALProxy("ALRobotPose", "127.0.0.1", 9559)
ttsProxy = ALProxy("ALTextToSpeech", "127.0.0.1", 9559)
vidProxy = ALProxy("ALVideoDevice", "127.0.0.1", 9559)
sentinel = ALProxy("ALSentinel", "127.0.0.1", 9559)
sensors = ALProxy("ALSensors", "127.0.0.1", 9559)

# turn off default beavior
sentinel.enableDefaultActionSimpleClick(False)
sentinel.enableDefaultActionDoubleClick(False)

# turn off sentinel
sentinel.enableHeatMonitoring(False)
motProxy.setWalkArmsEnable(True, True)

# Creating classes: Protocol is first three letters with exception gameStateController (gsc)
# stateController class: robot state, penalized, etc.
gsc = gameStateController.StateController("stateController", ttsProxy, memProxy, ledProxy, sensors)
print "Started gsc"

# Motion class: motion functions etc.
mot = motions.Motions(motProxy, posProxy)
# Motionhandler: threaded instance handling motion update
mHandler = motionHandler.MotionHandler(mot, gsc, memProxy)

mHandler.start()
print "motionHandler started"