img = np.array (img_) img = cv2.cvtColor (img, cv2.COLOR_BGR2RGB) marker_coords = find_marker (img, (marker_color_min, marker_color_max)) cv2.imwrite ("img" + str (times) + ".jpg", img) if (marker_coords [0] >= 0): print ("marker detected") walk = True if (marker_coords [1] >= 440): walk_back = True if (marker_coords [0] < 280): tts.Move (0, 0, 20) elif (marker_coords [0] > 360): tts.Move (0, 0, -20) else: print ("no marker") walk = False if (walk == True): if (walk_back == False): print ("walking straight") X = 0.8 Y = 0.0 Theta = 0.0
from naoqi import ALProxy #tts = ALProxy("ALTextToSpeech", "192.168.1.67", 9559) tts = ALProxy("MovementGraph", "192.168.1.67", 9559) #tts.say("Hello, world!") tts.Move (x, y, theta)