Go to the documentation of this file.00001
00002 import roslib; roslib.load_manifest('cob_grasp_generation')
00003 import rospy
00004
00005 import actionlib
00006 import moveit_msgs.msg
00007 import cob_grasp_generation.msg
00008
00009 def generate_grasps_client():
00010 client = actionlib.SimpleActionClient('generate_grasps', cob_grasp_generation.msg.GenerateGraspsAction)
00011 client.wait_for_server()
00012
00013 goal = cob_grasp_generation.msg.GenerateGraspsGoal()
00014
00015
00016
00017 goal.object_name="instanttomatosoup"
00018 goal.viewer = True
00019 goal.replan = True
00020
00021
00022
00023 client.send_goal(goal)
00024 client.wait_for_result()
00025 return client.get_result()
00026
00027 if __name__ == '__main__':
00028 try:
00029 rospy.init_node('generate_grasps_client')
00030 result = generate_grasps_client()
00031 print "Result:"
00032 print result
00033 except rospy.ROSInterruptException:
00034 print "program interrupted before completion"