Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 import rospy
00019 import actionlib
00020 from cob_sound.msg import *
00021
00022 def say_client():
00023 client = actionlib.SimpleActionClient('say', SayAction)
00024 client.wait_for_server()
00025
00026
00027 goal = SayGoal()
00028 goal.text = "Hello, how are you? I am fine."
00029
00030
00031 client.send_goal(goal)
00032
00033
00034 client.wait_for_result()
00035
00036
00037 return client.get_result()
00038 rospy.loginfo("Say action finished")
00039
00040 if __name__ == '__main__':
00041 try:
00042 rospy.init_node('say_client')
00043 result = say_client()
00044 except rospy.ROSInterruptException:
00045 print "program interrupted before completion"
00046