Go to the documentation of this file.00001
00002 import Tkinter
00003 import roslib
00004 roslib.load_manifest('face_contour_detector')
00005 import rospy
00006 from face_contour_detector.srv import *
00007 from face_contour_detector.msg import *
00008 import image_selection_frame
00009 import image_settings_frame
00010 from portrait_robot_msgs.srv import *
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 def show_handler(req):
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 props = req.proposals
00031 root = Tkinter.Tk()
00032 frame = image_selection_frame.ImageSelectionFrame(root, props)
00033 frame.pack()
00034 root.mainloop()
00035 service = rospy.ServiceProxy("/alubsc/edge_image", alubsc_node_instr)
00036 if image_settings_frame.current_image is None:
00037 service(False, [])
00038 else:
00039 service(True, [image_settings_frame.current_image])
00040
00041 return ContourDetectorGUIResponse()
00042
00043
00044 def init_gui_node():
00045 rospy.init_node("gui_server")
00046 s1 = rospy.Service("display_on_gui", ContourDetectorGUI, show_handler)
00047 rospy.spin()
00048
00049 if __name__ == "__main__":
00050 init_gui_node()