예제 #1
0
파일: woody1.py 프로젝트: txl302/Philos_R
def init_check():

    global visual_flag
    global motion_flag
    global audio_flag

    print 'self checking......'

    try:
        imgencode = woody_vision.cam()
        print "camera ready"
    except:
        print "camera offline"

    woody_embedded.random_look()

    try:
        os.system("mplayer /home/" + user_name +
                  "/Philos_R/Robots/Woody/speaker_checking.wav")
    except:
        pass
    time.sleep(2)

    try:
        from Woody import woody_action
        print "motion module detected"
        try:
            woody_action.init_check()
            print "motion unit ready"
        except:
            print "motion unit error"
    except:
        print "motion module offline"
    time.sleep(2)

    time.sleep(2)
예제 #2
0
파일: woody1.py 프로젝트: txl302/Philos_R
def send_to_emotion():
    global imgencode
    while True:
        imgencode = woody_vision.cam()
        se.sendto(imgencode, ("192.168.1.109", 9901))
    se.close()
예제 #3
0
파일: woody1.py 프로젝트: txl302/Philos_R
def cam():
    while True:
        global imgencode
        imgencode = woody_vision.cam()