generate_grasps_client.py
Go to the documentation of this file.
00001 #! /usr/bin/env python
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     #goal.object_name="yellowsaltcube"
00015     #goal.object_name="hotpot"
00016     #goal.object_name="hotpot2"
00017     goal.object_name="instanttomatosoup"
00018     goal.viewer = True
00019     goal.replan = True
00020     #ToDo: set the other OpenRAVE parameters for grasp_generation
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"


cob_grasp_generation
Author(s): Witalij Siebert, Felix Messmer
autogenerated on Wed Aug 26 2015 11:01:25