face_detector_service_client.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 import roslib; roslib.load_manifest('cob_people_detection')
00003 
00004 import sys
00005 
00006 import rospy
00007 from cob_people_detection.srv import *
00008 
00009 def recognition_service_client(running, doRecognition, display):
00010     rospy.wait_for_service('/cob_people_detection/face_detection/recognize_service_server')
00011     try:
00012         recognition_service = rospy.ServiceProxy('/cob_people_detection/face_detection/recognize_service_server', Recognition)
00013         res = recognition_service(running, doRecognition, display)
00014         return res
00015     except rospy.ServiceException, e:
00016         print "Service call failed: %s"%e
00017 
00018 def usage():
00019     return "%s [running, doRecognition, display]"%sys.argv[0]
00020 
00021 if __name__ == "__main__":
00022     if len(sys.argv) == 4:
00023         running = bool(sys.argv[1])
00024         doRecognition = bool(sys.argv[2])
00025         display = bool(sys.argv[2])
00026     else:
00027         print usage()
00028         sys.exit(1)
00029     print recognition_service_client(True, True, True)
00030 


cob_people_detection
Author(s): Richard Bormann , Thomas Zwölfer
autogenerated on Fri Aug 28 2015 10:24:12