fake_action_user.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 import roslib
00003 roslib.load_manifest('srs_assisted_detection')
00004 
00005 
00006 import rospy
00007 
00008 from cob_object_detection_msgs.msg import *
00009 from srs_assisted_detection.srv import *
00010 from std_msgs.msg import *
00011 
00012 from geometry_msgs.msg import *
00013 
00014 from array import array
00015 
00016 
00017 def user_msg():    
00018     rospy.wait_for_service('assisted_answer')
00019     s=String()
00020     s.data='succeeded'   #succeeded, give_up or retry
00021     try:
00022         user_intervention_on_detection = rospy.ServiceProxy('assisted_answer', UiAnswer)
00023         rospy.loginfo("this is fake_action_user")
00024         #a=array('i',[2,3,4,5])
00025         #resp1 = user_intervention_on_detection(a,0,s)   # detected object 0 has been succeeded
00026         
00027         resp1 = user_intervention_on_detection(0,s)   # detected object 0 has been succeeded
00028         
00029         #resp1 = user_intervention_on_detection(a,7,s)   # detected object 7 OUT OF INDEX
00030         rospy.loginfo(resp1)
00031     except rospy.ServiceException, e:
00032         print "Service call failed: %s"%e
00033     
00034     
00035 if __name__ == "__main__":
00036     user_msg()


srs_assisted_detection
Author(s): Heiko Hoennige
autogenerated on Mon Oct 6 2014 08:31:59