$search
00001 #! /usr/bin/env python 00002 00003 import roslib; roslib.load_manifest('pr2_dremel_server') 00004 import rospy 00005 import actionlib 00006 import math 00007 import copy 00008 00009 import pr2_dremel_server.msg as action_msg 00010 import geometry_msgs.msg 00011 00012 00013 00014 00015 if __name__ == '__main__': 00016 rospy.init_node('dremel_plotter_test_clietn') 00017 00018 00019 goal = action_msg.CarveSegmentsGoal() 00020 point = geometry_msgs.msg.Point() 00021 point.x = 0.55 00022 point.y = -0.01 00023 seg1 = action_msg.Segment() 00024 seg1.points.append(copy.deepcopy(point)) 00025 point.y = 0.01 00026 seg1.points.append(copy.deepcopy(point)) 00027 00028 point.x = 0.5 00029 seg2 = action_msg.Segment() 00030 seg2.points.append(copy.deepcopy(point)) 00031 point.y = -0.01 00032 seg2.points.append(copy.deepcopy(point)) 00033 00034 goal.segments.append(seg1) 00035 goal.segments.append(seg2) 00036 00037 00038 client = actionlib.SimpleActionClient('dremel_actionserver', action_msg.CarveSegmentsAction) 00039 rospy.loginfo('Waiting for server') 00040 client.wait_for_server() 00041 00042 rospy.loginfo('Sending goal') 00043 client.send_goal(goal) 00044 rospy.loginfo('Waiting for results') 00045 client.wait_for_result() 00046 00047