00001
00002
00003 import time
00004
00005 import roslib
00006 roslib.load_manifest('cob_script_server')
00007 import rospy
00008
00009 from simple_script_server import *
00010 from script_utils import *
00011
00012
00013 class Test_Sound(script):
00014 def Run(self):
00015 if not self.sss.parse:
00016 rospy.loginfo("Testing Sound modes...")
00017 for i in range(1):
00018 self.sss.say(["Hello, my name is Care-O-bot."])
00019
00020 self.sss.say(["Hello, my name is Care-O-bot.","How are you?"])
00021
00022 self.sss.say("sent00")
00023
00024 self.sss.say("sent00","de")
00025
00026 self.sss.say(123)
00027 self.sss.say([123])
00028
00029 self.sss.say(['Once Upon A Time, there was a Shoemaker named Zerbo. He very carefully handcrafted every pair of shoes. Each pair of shoes was made especially for each person, and they were made to fit perfectly.'],False)
00030
00031 self.sss.sleep(1)
00032 self.sss.say(["This is a non blocking voice which should be played in parallel to the previous text."])
00033
00034 rospy.set_param("script_server/sound/language","de")
00035 self.sss.play("grasp_tutorial_01")
00036
00037 rospy.set_param("script_server/sound/language","en")
00038 self.sss.play("grasp_tutorial_01")
00039
00040 if __name__ == "__main__":
00041 SCRIPT = Test_Sound()
00042 SCRIPT.Start()