import sys
import time

IPC = "10.15.89.247"
PORT = 9559

try:
    print "try"
    motionC = ALProxy("ALMotion", IPC, PORT)
    
except Exception,e:
    print "Error when creating STMOBJECT_NAME proxy:"
    print str(e)
    exit(1)
    

from naoqi import ALProxy

tts = ALProxy("ALTextToSpeech", "10.15.89.247", 9559)
tts.say("Hello, world!")

@@ -16,17 +16,196 @@
 rt time%0A
-%0A
+from naoqi import ALProxy%0A%0Adef preloadBehaviors ():%0A    beManagerC.preloadBehavior(up);%0A    beManagerC.preloadBehavior(tai);%0A    beManagerC.preloadBehavior(down);%0A%0Adef main():%0A    
 IPC = %221
@@ -217,16 +217,20 @@
 89.247%22%0A
+    
 PORT = 9
@@ -237,14 +237,28 @@
 559%0A
-%0A
+      %0A    
 try:%0A
+    
     
@@ -269,16 +269,20 @@
 t %22try%22%0A
+    
     moti
@@ -322,17 +322,235 @@
 RT)%0A    
-%0A
+    beManagerC = ALProxy(%22ALBehaviorManager%22,IPC,PORT)%0A        audioC = ALProxy(%22ALAudioDevice%22,IPC,PORT)%0A        memoryC = ALProxy(%22ALMemory%22,IPC,PORT)%0A        speechC = ALProxy(%22ALTextToSpeech%22,IPC,PORT)%0A        %0A    
 except E
@@ -561,16 +561,20 @@
 tion,e:%0A
+    
     prin
@@ -619,24 +619,28 @@
 proxy:%22%0A    
+    
 print str(e)
@@ -640,16 +640,20 @@
  str(e)%0A
+    
     exit
@@ -664,112 +664,771 @@
     
-%0A%0Afrom naoqi import ALProxy%0A%0Atts = ALProxy(%22ALTextToSpeech%22, %2210.15.89.247%22, 9559)%0Atts.say(%22Hello, world!%22)
+    %0A    up = %22standup%22; ##Rutina para pararse%0A    down = %22sitdown%22; ##Rutina para sentarse%0A    tai = %22taiChi%22; ##Rutina de baile del taichi%0A    %0A    preloadBehaviors()%0A    %0A    beManagerC.runBehavior(up);%0A    #sleep de 0.5 seg para que tenga pausas entre acciones%0A    time.sleep(0.5);%0A    speechC.say( %22Hello!%22 );%0A    speechC.say( %22My name is Sheldon!%22 );%0A    %0A    motionC.post.setStiffnesses (%22Body%22, 1.0); ##Activa los motores%0A    time.sleep(2);%0A    beManagerC.runBehavior(up);%0A    motionC.walkTo(0.5,0.0,0.0);%0A    %0A    speechC.say( %22This is my new dance!%22 );%0A    beManagerC.runBehavior(tai);%0A    time.sleep(1.5);%0A    %0A    speechC.post.say( %22I am tired, I'm going to sit%22 );%0A    beManagerC.runBehavior(down);%0A    motionC.setStiffnesses( %22Body%22 ,0.0);%0A    exit(0);
 %0A

prueba behavior