Skip to content

Commit

Permalink
Merge pull request meadx#27 from edwin-nz/master
Browse files Browse the repository at this point in the history
Updated UNKNOWN condition to output to rospy.loginfo
  • Loading branch information
edwin-nz authored Dec 5, 2018
2 parents e02657a + 2022c2e commit 8f67594
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ros/src/tl_detector/light_classification/tl_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,18 @@ def get_classification(self, image):

#print('Traffic Light Prediction ', predict[0])
if predict[0][0] > self.threshold:
#print('Classifier Prediction - RED', predict[0][0])
rospy.loginfo(" Classifier Prediction - RED %f", predict[0][0])
return TrafficLight.RED
elif predict[0][1] > self.threshold:
#print('Classifier Prediction - YELLOW', predict[0][1])
rospy.loginfo(" Classifier Prediction - YELLOW %f", predict[0][1])
return TrafficLight.YELLOW
elif predict[0][2] > self.threshold:
#print('Classifier Prediction - YELLOW', predict[0][1])
rospy.loginfo(" Classifier Prediction - GREEN %f", predict[0][2])
return TrafficLight.GREEN
else:
#print('Classifier Prediction - UNKNOWN', label_vgg16[0][0])
rospy.loginfo(" Classifier Prediction - UNKNOWN [%s, %f]", label_vgg16[0][0][1], label_vgg16[0][0][2])
return TrafficLight.UNKNOWN

0 comments on commit 8f67594

Please sign in to comment.