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
00020 import actionlib
00021 import moveit_msgs.msg
00022 import cob_grasp_generation.msg
00023
00024 def generate_grasps_client():
00025 client = actionlib.SimpleActionClient('generate_grasps', cob_grasp_generation.msg.GenerateGraspsAction)
00026 client.wait_for_server()
00027
00028 goal = cob_grasp_generation.msg.GenerateGraspsGoal()
00029
00030
00031
00032
00033 goal.object_name="cokeplasticsmall"
00034
00035 goal.gripper_type = "sdh"
00036
00037
00038 goal.viewer = True
00039 goal.replan = True
00040
00041 client.send_goal(goal)
00042 client.wait_for_result()
00043 return client.get_result()
00044
00045 if __name__ == '__main__':
00046 try:
00047 rospy.init_node('generate_grasps_client')
00048 result = generate_grasps_client()
00049 print "Result:"
00050 print result
00051 except rospy.ROSInterruptException:
00052 print "program interrupted before completion"