Exemplo n.º 1
0
def main():

    #a= "Uh, summa-lumma, dooma-lumma"+"You assumin' I'm a human"+"What I gotta do to get it through to you? I'm superhuman"+"Innovative and I'm made of rubber"+"So that anything you say is ricocheting off of me"+"And it'll glue to you and"+"I'm devastating, more than ever demonstrating"+"How to give a mothafuckin' audience a feelin' like it's levitating"+"Never fading, and I know the haters are forever waiting"+"For the day that they can say I fell off, they'll be celebrating"+"‘Cause I know the way to get 'em motivated"+"I make elevating music, you make elevator music"+"Oh, he's too mainstream."+"Well, that's what they do when they get jealous"+"They confuse it; It's not hip-hop, it's pop."+"‘Cause I found a hella way to fuse it"+"With rock, shock rap with Doc"+"Throw on Lose Yourself and make 'em lose it"+"I don't know how to make songs like that"+"I don't know what words to use."+"Let me know when it occurs to you"+"While I'm rippin' any one of these verses that versus you"+"It's curtains, I'm inadvertently hurtin' you"+"How many verses I gotta murder to"+"Prove that if you were half as nice"+"Your songs you could sacrifice virgins to?"+"Ungh, school flunky, pill junkie"+"But look at the accolades these skills brung me"+"Full of myself, but still hungry"+"I bully myself, ‘cause I make me do what I put my mind to"+"And I'm a million leagues above you"+"Ill when I speak in tongues, but it's still tongue-in-cheek, f**k you!"
    # build the robot

    a = "Hello,  I am Maqui, I am a Pepper Robot from D I E Robotics Lab"

    rospy.init_node("test")
    maqui = robot_factory.build(["facial_features", "people_perception"],
                                core=True)
    maqui.check()

    print("Testing Maqui Robot Skills")
    maqui.tts.set_language("English")
    maqui.tts.set_speed(90)
    maqui.tts.set_volume(0.5)

    maqui.basic_motion.wake_up()

    maqui.neck.look_front()

    maqui.tts.say("Starting a facial features Test!, i'm looking for lukitas ")
    maqui.tts.wait_until_done()
    print("lol ")
    maqui.people_perception.reset_population()
    r = rospy.Rate(2.0)
    a = False
    try:

        while not a:

            a = maqui.people_perception.is_people_detected()

        ids = maqui.people_perception.get_crowd()
        id = ids[0]

        position = maqui.people_perception.get_position(id)

        x = position[0] - 0.2

        y = position[1]
        print(x, y)
        maqui.base.move(x, y)
        maqui.base.wait_until_done()

        maqui.neck.look_at(x=1.0, z=position[2])

        maqui.tts.say("Hi Lukitas, How are you?")
        maqui.tts.wait_until_done()

        maqui.tts.set_speed(50)
        maqui.tts.say("f**k you meen")
        maqui.base.rotate(180)

    except KeyboardInterrupt:
        maqui.base.stop()
        print("Finished by user")
Exemplo n.º 2
0
def main():

    # build the robot

    a = "Hello,  I am Maqui, I am a Pepper Robot from D I E Robotics Lab"

    rospy.init_node("test")
    maqui = robot_factory.build(
        ["facial_features", "people_perception", 'track_person'], core=True)
    maqui.check()

    print("Testing Maqui Robot Skills")
    maqui.tts.set_language("English")
    maqui.tts.set_speed(90)
    maqui.tts.set_volume(0.5)

    maqui.basic_motion.wake_up()

    maqui.neck.look_front()

    maqui.tts.say("Starting a track test, trackig lukitas ")
    maqui.tts.wait_until_done()
    print("lol ")
    maqui.people_perception.reset_population()
    r = rospy.Rate(2.0)
    a = False
    try:

        while not a:

            a = maqui.people_perception.is_people_detected()
            if a:
                print('Person detected!')
        ids = maqui.people_perception.get_crowd()
        id = ids[0]

        maqui.track_person.track_person(id)
        print("Starting Tracks")

        try:
            while True:
                rospy.sleep(1)
        except KeyboardInterrupt:
            print
            print "Interrupted by user"
            print "Stopping..."

        maqui.tts.say("Hi Lukitas, How are you?")
        maqui.base.rotate(180)

    except KeyboardInterrupt:
        maqui.base.stop()
        print("Finished by user")
        maqui.track_person.unregister_targets()
        maqui.track_person.stop_track()
Exemplo n.º 3
0
def main():

    rospy.init_node("test")
    maqui = robot_factory.build(["facial_features"], core=True)
    maqui.check()
    try:
        FaceDetector(maqui)
        rospy.spin()

    except KeyboardInterrupt:
        maqui.base.stop()
        print("Finished by user")
Exemplo n.º 4
0
def main():

    a = "Uh, summa-lumma, dooma-lumma" + "You assumin' I'm a human" + "What I gotta do to get it through to you? I'm superhuman" + "Innovative and I'm made of rubber" + "So that anything you say is ricocheting off of me" + "And it'll glue to you and" + "I'm devastating, more than ever demonstrating" + "How to give a mothafuckin' audience a feelin' like it's levitating" + "Never fading, and I know the haters are forever waiting" + "For the day that they can say I fell off, they'll be celebrating" + "‘Cause I know the way to get 'em motivated" + "I make elevating music, you make elevator music" + "Oh, he's too mainstream." + "Well, that's what they do when they get jealous" + "They confuse it; It's not hip-hop, it's pop." + "‘Cause I found a hella way to fuse it" + "With rock, shock rap with Doc" + "Throw on Lose Yourself and make 'em lose it" + "I don't know how to make songs like that" + "I don't know what words to use." + "Let me know when it occurs to you" + "While I'm rippin' any one of these verses that versus you" + "It's curtains, I'm inadvertently hurtin' you" + "How many verses I gotta murder to" + "Prove that if you were half as nice" + "Your songs you could sacrifice virgins to?" + "Ungh, school flunky, pill junkie" + "But look at the accolades these skills brung me" + "Full of myself, but still hungry" + "I bully myself, ‘cause I make me do what I put my mind to" + "And I'm a million leagues above you" + "Ill when I speak in tongues, but it's still tongue-in-cheek, f**k you!"
    # build the robot
    rospy.init_node("test")
    maqui = robot_factory.build([], core=True)
    maqui.check()
    print("Testing Maqui Robot Skills")
    maqui.tts.set_language("English")
    maqui.tts.set_speed(200)
    rospy.sleep(1.0)
    maqui.tts.set_gestures_mode(1)
    maqui.tts.say_with_gestures(a)
            },

        )
        smach.StateMachine.add('SAY_ANSWER',SaySelection(robot),
            transitions={
                'succeeded':'FINISH'
            },

        )
        smach.StateMachine.add('FINISH',Speak(robot,"Muchas Gracias"),
            transitions={
                'succeeded':'succeeded'
            }
        )
    return sm


if __name__ == '__main__':
    rospy.init_node('rt_detection_state')

    robot= robot_factory.build([
        "audition",
        "tts"],core=True)

    sm = getInstance(robot)


    sis = IntrospectionServer('example_state', sm, '/EA_INIT_STATE') #Smach Viewer
    sis.start()
    outcome = sm.execute()
    sis.stop()
Exemplo n.º 6
0
                                   'succeeded': 'HEAR_INFO',
                                   'map_game': 'MAP_GAME',
                                   'cover_detector': 'COVER_DETECTOR'
                               })
        smach.StateMachine.add('MAP_GAME',
                               MapGame.getInstance(robot),
                               transitions={'succeeded': 'ITERATORMANAGER'})
        smach.StateMachine.add('HEAR_INFO',
                               HearInfo.getInstance(robot),
                               transitions={
                                   'succeeded': 'ITERATORMANAGER',
                                   'aborted': 'ITERATORMANAGER'
                               })
        smach.StateMachine.add('COVER_DETECTOR',
                               CoverDetector.getInstance(robot),
                               transitions={'succeeded': 'ITERATORMANAGER'})
    return sm


if __name__ == '__main__':
    rospy.init_node('ENDAGEREDANIMALS')

    robot = robot_factory.build(["audition", "tts", "tablet"], core=False)

    sm = getInstance(robot)

    sis = IntrospectionServer('example_state', sm,
                              '/EA_INIT_STATE')  #Smach Viewer
    sis.start()
    outcome = sm.execute()
    sis.stop()
Exemplo n.º 7
0
#!/usr/bin/env python

#Basic ROS
import rospy

#Robot building
from maqui_skills import robot_factory

if __name__ == '__main__':

    rospy.init_node("test_audition")
    maqui = robot_factory.build(
        ["audition", 'tts', 'sound_localization', 'base'], core=False)
    while not rospy.is_shutdown():
        word = maqui.audition.recognize_with_grammar('/Stage1/GPSR/gpsr')
        print word
        maqui.tts.say(word)
Exemplo n.º 8
0
                robot,
                "Felicitaciones a su equipo, ahora deben esperar que todos los equipos terminen para poder saber al ganador"
            ),
            transitions={'succeeded': 'PRE_WAIT'})

        smach.StateMachine.add('SPEAK_RETURN',
                               Speak(robot, "Suerte con la pregunta"),
                               transitions={'succeeded': 'PRE_WAIT'})

        return sm


if __name__ == '__main__':

    rospy.init_node('TREASURE')
    base_skills = [
        "audition", "marker", "tablet", "tabletapp", 'knowledge', "navigation",
        "person_detector", "facial_features", "l_arm", "r_arm"
    ]  #,
    #"sitting_person_detector"] not sure if we need this

    extra_skills = []

    robot = robot_factory.build(base_skills + extra_skills, core=True)

    sm = getInstance(robot)
    sis = IntrospectionServer('treasure', sm, '/TREASURE_SM')  #Smach Viewer
    sis.start()
    outcome = sm.execute()  # here is where the test begin
    sis.stop()
Exemplo n.º 9
0
def main():

    #a= "Uh, summa-lumma, dooma-lumma"+"You assumin' I'm a human"+"What I gotta do to get it through to you? I'm superhuman"+"Innovative and I'm made of rubber"+"So that anything you say is ricocheting off of me"+"And it'll glue to you and"+"I'm devastating, more than ever demonstrating"+"How to give a mothafuckin' audience a feelin' like it's levitating"+"Never fading, and I know the haters are forever waiting"+"For the day that they can say I fell off, they'll be celebrating"+"‘Cause I know the way to get 'em motivated"+"I make elevating music, you make elevator music"+"Oh, he's too mainstream."+"Well, that's what they do when they get jealous"+"They confuse it; It's not hip-hop, it's pop."+"‘Cause I found a hella way to fuse it"+"With rock, shock rap with Doc"+"Throw on Lose Yourself and make 'em lose it"+"I don't know how to make songs like that"+"I don't know what words to use."+"Let me know when it occurs to you"+"While I'm rippin' any one of these verses that versus you"+"It's curtains, I'm inadvertently hurtin' you"+"How many verses I gotta murder to"+"Prove that if you were half as nice"+"Your songs you could sacrifice virgins to?"+"Ungh, school flunky, pill junkie"+"But look at the accolades these skills brung me"+"Full of myself, but still hungry"+"I bully myself, ‘cause I make me do what I put my mind to"+"And I'm a million leagues above you"+"Ill when I speak in tongues, but it's still tongue-in-cheek, f**k you!"
    # build the robot

    #a= "Hello,  I am Maqui, I am a Pepper Robot from D I E Robotics Lab"
    
    rospy.init_node("test")
    
    maqui = robot_factory.build(["facial_features","tts","basic_motion","neck"],core=False)
    maqui.check()
    

    maqui.basic_motion.wake_up()

    print("Testing Maqui Robot Skills")
    maqui.tts.set_language("English")
    maqui.tts.set_speed(90)
    maqui.tts.set_volume(0.1)
    

    maqui.neck.look_front()

    dontseeyou = True
    seeyou = True
    maqui.tts.say("Facial Features Test")
    maqui.tts.wait_until_done()
    r =rospy.Rate(3.0)
    

    try:
        while not rospy.is_shutdown():
            
            if maqui.facial_features.is_face_detected:
                if seeyou:
                    #maqui.tts.say("I see your face")
                    face_id = maqui.facial_features._get_face_id()
                    
                    print(str(face_id))
                   
                    name_info = maqui.facial_features.recognize_face()
                    name = name_info[0][2]
                    maqui.tts.wait_until_done()

                    if name !=  "":
                        maqui.tts.say("Hello " + name)
                        maqui.tts.wait_until_done()

                seeyou = False
            
            else:
                seeyou = True

            facial_features = maqui.facial_features.get_facial_features()
            
            if facial_features == []:
                pass
            
            else:
                ages =facial_features[0][0] 
                age = ages[0]
                age_confidence = ages[1]
                
                genders=facial_features[0][1] 

                gender = genders[0]
                gender_confidence = genders[1]
                
                print("AGE : " + str(age) +' , ' + str(age_confidence))
                print("GENDER : " + str(gender) +' , ' + str(gender_confidence))

                gender = {1:"male",0:"female",-1:"lol"}
                           

                g = gender[1]
                maqui.tts.say("You are "+ g + ", and you are " + str(age) + " years old")
                maqui.tts.wait_until_done()
        r.sleep()    
    
    except KeyboardInterrupt:
        print("Finished by user")