Go to the documentation of this file.00001
00002
00003
00004 import roslib; roslib.load_manifest('pr2_plugs_actions')
00005 import rospy;
00006 import actionlib;
00007 from pr2_common_action_msgs.msg import *
00008 from pr2_plugs_msgs.msg import *
00009
00010
00011
00012
00013
00014 def execute_cb(goal):
00015 rospy.loginfo("Action server received goal")
00016
00017
00018 result = VisionOutletDetectionResult()
00019 result.outlet_pose = goal.prior
00020 result.outlet_pose = server.set_succeeded(result)
00021
00022
00023
00024 if __name__ == '__main__':
00025
00026 name = 'vision_outlet_detection'
00027 rospy.init_node(name)
00028 server = actionlib.simple_action_server.SimpleActionServer(name, VisionOutletDetectionAction, execute_cb)
00029 rospy.loginfo('%s: Action server running', name)
00030 rospy.spin()