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 random
00019
00020 import rospy
00021 import actionlib
00022
00023 import cob_lookat_action.msg
00024
00025 def cob_lookat_action_client():
00026 client = actionlib.SimpleActionClient('lookat_action', cob_lookat_action.msg.LookAtAction)
00027 print "Waiting for Server..."
00028 client.wait_for_server()
00029 print "...done!"
00030
00031
00032 goal = cob_lookat_action.msg.LookAtGoal()
00033 goal.target_frame = "lookat_target"
00034 goal.pointing_frame = "sensorring_base_link"
00035 goal.pointing_axis_type = 0
00036
00037
00038
00039 client.send_goal(goal)
00040
00041
00042 client.wait_for_result()
00043
00044 result = client.get_result()
00045 print result
00046
00047 return result.success
00048
00049 if __name__ == '__main__':
00050 try:
00051 rospy.init_node('cob_lookat_action_client')
00052 result = cob_lookat_action_client()
00053 except rospy.ROSInterruptException:
00054 print "program interrupted before completion"