vision_detect_plug.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 # stub for plug detection action
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 #server actionlib.simple_action_server.SimpleActionServer
00013 
00014 def execute_cb(goal):
00015   rospy.loginfo("Action server received goal")
00016 
00017   # return the prior as the result
00018   result = VisionPlugDetectionResult()
00019   result.plug_pose = goal.prior
00020   result.plug_pose = server.set_succeeded(result)
00021   
00022 
00023 
00024 if __name__ == '__main__':
00025   #Initialize the node
00026   name = 'vision_plug_detection'
00027   rospy.init_node(name)
00028   server = actionlib.simple_action_server.SimpleActionServer(name, VisionPlugDetectionAction, execute_cb)
00029   rospy.loginfo('%s: Action server running', name)
00030   rospy.spin()


pr2_plugs_actions
Author(s): Jon Bohren, Patrick Mihelich, Wim Meeussen, and Melonee Wise
autogenerated on Mon Dec 2 2013 13:24:10