Exemple #1
0
 def __init__(self):
     State.__init__(self,
                    input_keys=['clusters', 'bounding_boxes', 'names'],
                    output_keys=['names'],
                    outcomes=['done'])
     self.label_vis = LabelVisualizer('object_labels', 'teal')
     try:
         rospy.wait_for_service('recognize_object', timeout=5)
         self.recognize = rospy.ServiceProxy('recognize_object',
                                             RecognizeObject)
     except rospy.ROSException:
         rospy.logwarn('Object recognition service is not available, '
                       'will return "unknown" for all objects.')
         self.recognize = None