Go to the documentation of this file.00001
00002
00003 from __future__ import print_function
00004
00005 import rospy
00006
00007 import actionlib
00008
00009
00010
00011 import actionlib_tutorials.msg
00012
00013 def fibonacci_client():
00014
00015
00016 client = actionlib.SimpleActionClient('fibonacci', actionlib_tutorials.msg.FibonacciAction)
00017
00018
00019
00020 client.wait_for_server()
00021
00022
00023 goal = actionlib_tutorials.msg.FibonacciGoal(order=20)
00024
00025
00026 client.send_goal(goal)
00027
00028
00029 client.wait_for_result()
00030
00031
00032 return client.get_result()
00033
00034 if __name__ == '__main__':
00035 try:
00036
00037
00038 rospy.init_node('fibonacci_client_py')
00039 result = fibonacci_client()
00040 print("Result:", ', '.join([str(n) for n in result.sequence]))
00041 except rospy.ROSInterruptException:
00042 print("program interrupted before completion", file=sys.stderr)