filmov
tv
Python Programming your NAO Robot Tutorial Video 1
Показать описание
Hi everyone and welcome to how program your NAO robot with Python tutorial video number 1.
Hi everyone and welcome to how program your NAO robot with Python tutorial video number 1. On this tutorial we are looking into the first basic steps on how to use Python to program your robot. So if you want to learn the first steps to being a programming robot genius, then stay tuned.
Right, hi guys. Today we are looking at how to do some python coding. So we are going to get our NAO robot to speak using Python.
So the way we do this, jumping straight into it.
First of all, we are going to check our NAO. So let me just lift up his arm to make sure he is connected. Yeah, there we go. He is connected. That is what we want.
Now we see in the main robot section as well, he is all connected.
So Python. So what we want to do is we first want to create a box that we could put our python code into. This box will make our robot speak in. Speak "Hello". "Hello I am a robot".
• Right click the main section box and go to "add new box"
• Create a name for the box
• Input main image
• Select the type of box
So this time we are having a look at the script. So we go into the scripts and we click ok. And there we have our NAO little box. Now if we click into it, we have the python code. So this is what we are going to change. You can see it has already popped out there. So obviously, it is one of the features of the Choreograph is that you don't have to be... It doesn't have to be separate. It can be any kind of little box. I do actually want to separate which is quite nice. There we go. So just drag it out so it separates just so I could show what is going on. If you pick it up and hover over a particular part of the Choreograph window is it will just pop in there so you can have a bit more space if you are using the main panel. So what we are going to do is we are going to change some of the codes and we are going to get our robot to speak.
• Double click the box
• Select the piece of code you need to alter to get our robot to speak("def onInput_onStart(self)”)
• Take out the pass section
• Type in "ttsproxy = ALProxy("ALTextToSpeech")". (Make sure you get the comment in there).
Right! So there we have I just taught you in there. It is a very easy basic tutorial to start with. And the first line could create an object that gives us access to the robot's text to speech capabilities. This object is assigned to the variable ttsProxy. We can access the object later through the name ttsProxy. So the top line here which I am going to mount which and the alspeech is there. The second line calls a different function site. Got to say that, long is the object we just created. This function takes an argument "Hello, I am a robot" and then he uses a string or sequence of characters between two double quoted marks.
Hi everyone and welcome to how program your NAO robot with Python tutorial video number 1. On this tutorial we are looking into the first basic steps on how to use Python to program your robot. So if you want to learn the first steps to being a programming robot genius, then stay tuned.
Right, hi guys. Today we are looking at how to do some python coding. So we are going to get our NAO robot to speak using Python.
So the way we do this, jumping straight into it.
First of all, we are going to check our NAO. So let me just lift up his arm to make sure he is connected. Yeah, there we go. He is connected. That is what we want.
Now we see in the main robot section as well, he is all connected.
So Python. So what we want to do is we first want to create a box that we could put our python code into. This box will make our robot speak in. Speak "Hello". "Hello I am a robot".
• Right click the main section box and go to "add new box"
• Create a name for the box
• Input main image
• Select the type of box
So this time we are having a look at the script. So we go into the scripts and we click ok. And there we have our NAO little box. Now if we click into it, we have the python code. So this is what we are going to change. You can see it has already popped out there. So obviously, it is one of the features of the Choreograph is that you don't have to be... It doesn't have to be separate. It can be any kind of little box. I do actually want to separate which is quite nice. There we go. So just drag it out so it separates just so I could show what is going on. If you pick it up and hover over a particular part of the Choreograph window is it will just pop in there so you can have a bit more space if you are using the main panel. So what we are going to do is we are going to change some of the codes and we are going to get our robot to speak.
• Double click the box
• Select the piece of code you need to alter to get our robot to speak("def onInput_onStart(self)”)
• Take out the pass section
• Type in "ttsproxy = ALProxy("ALTextToSpeech")". (Make sure you get the comment in there).
Right! So there we have I just taught you in there. It is a very easy basic tutorial to start with. And the first line could create an object that gives us access to the robot's text to speech capabilities. This object is assigned to the variable ttsProxy. We can access the object later through the name ttsProxy. So the top line here which I am going to mount which and the alspeech is there. The second line calls a different function site. Got to say that, long is the object we just created. This function takes an argument "Hello, I am a robot" and then he uses a string or sequence of characters between two double quoted marks.
Комментарии