From d0800ca0ab58a502007dd577c2aac1dc71eeac2e Mon Sep 17 00:00:00 2001 From: Jonas Date: Fri, 1 Jun 2018 15:02:09 +0200 Subject: [PATCH] print head angle, when ball is in the middle of the view live_recognition.py --- scripts/live_recognition_with_head.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/live_recognition_with_head.py b/scripts/live_recognition_with_head.py index 00decdc..f16ce94 100644 --- a/scripts/live_recognition_with_head.py +++ b/scripts/live_recognition_with_head.py @@ -77,6 +77,7 @@ def set_angle_new(x,y): angles=[0.25*ball_angle_x,0.25*ball_angle_y] if abs(ball_angle_x)>0.1 or abs(ball_angle_y)>0.1: motionProxy.changeAngles(names, angles, fractionMaxSpeed) + elif abs(ball_angle_x)<0.1 and abs(ball_angle_y)<0.1: #tts = ALProxy("ALTextToSpeech", "192.168.0.11", 9559) #tts.setParameter("pitchShift", 1) @@ -86,7 +87,7 @@ def set_angle_new(x,y): #tts.say("Ball found") print("Ball found") - + print(get_angle())