def emotion_ready(self): if api.Initialize(): print("Initialized") api.PlayAction(3) time.sleep(3) else: print("Initialization failed") sys.exit(1)
def Main(): command = 1 try: if api.Initialize(): print("Initalized") command = 1 else: print("Intialization failed") Run(command) except (KeyboardInterrupt): api.ServoShutdown() sys.exit() except (): api.ServoShutdown() sys.exit()
def Main(): command = 1 #api.ServoShutdown() try: if api.Initialize(): print("Initalized") command = 1 else: print("Intialization failed") #api.ServoShutdown() api.PlayAction(8) print('Stand up') #value = int(input("Turn head to")) #api.SetMotorValue(20, value) Run(command) except (KeyboardInterrupt): api.ServoShutdown() sys.exit() except (): api.ServoShutdown() sys.exit()
def Main(): #api.ServoShutdown() try: if api.Initialize(): print("Initalized") else: print("Intialization failed") #api.ServoShutdown() #api.PlayAction(8) global Socket #value = int(input("Turn head to")) #api.SetMotorValue(20, value) #Socket.sl_connect() print("Atempting to connect to socket") #Socket.connect(("10.0.0.112", 9001)) print("Connected") #api.PlayAction(8) Run() except (KeyboardInterrupt): api.ServoShutdown() sys.exit() except (): api.ServoShutdown() sys.exit()
# print ('No Trun') print("pan", pan) print("tilt", tilt) #api.ServoShutdown() #Run() if __name__ == '__main__': import sys, getopt Walk = False sit = 0 HeadMoved = 0 print help_message try: if api.Initialize(): print("Initalized") else: print("Intialization failed") except (KeyboardInterrupt): api.ServoShutdown() sys.exit() except (): api.ServoShutdown() sys.exit() args, video_src = getopt.getopt(sys.argv[1:], '', ['cascade=', 'nested-cascade=']) try: video_src = video_src[0] except: