As discussed in class, your second program with the Nao will be programmed in python using the various libraries of functions I demonstrated. Your program should do the following:
a) Begin by listening for the word “Go”. You should recognize this word with the speech recognition routines.
b) A localization step should then occur. The robot should say “Where are you?” using the text to speech routines. It should then use the audio location routines to determine where your response of “Here” comes from. This will be an angle in radians that you can use to turn your robot in the correct direction using the motion routines. You can repeat this localization step whenever you want as your program is running.
c) The robot should walk in the direction of the voice, listening for the word “Stop”, which will either indicate he has reached you, or some other emergency is about to occur and you want the robot to stop.
d) As the robot is walking it may encounter an obstacle. You can detect this by monitoring the values determined by the ultrasound sensors to measure that there is an object right in front of part of the robot. When this is detected, the robot should use the approach of the bug algorithm to walk around the perimeter of the object until there is again a clear line of sight between the robot and you, and it can continue its journey. You might want to use the localization step during this process. For obstacles, make sure to use things that are tall enough to bounce the ultrasound waves off of, like a box or a trash can.