Nao robot programming python


So in instead of using the drag and drop box system in Choregraphe, we will implement a Python behaviour. And welcome to the turn and walk tutorial Python Tutorial.

So what we going to do is we are going to take this one step at the time. Now, the signal is box up here, this is basically more of the Python code but I wanted to put it up here just to make this little bit quicker so you won't see see me type lots of lots of text. Now what we want to do, so you don't see me type tons of tons of code I already created a box and done this already.

Which is already here, this is the little fellow here. So I am going to delete this one and cut and just going to bring the one that is already done and coded. Nao robot programming python to walk you through it, we are going to enter the details onto the onInput and onStart as we've done before. What we've done here is we've done import math so what it does is import the uses of nao robot programming python functions such as atan which is the tangent functions and square root functions, without that square root will not work.

The code takes the X and Y parameters and compute the angle for turn using the atan functions, the tangent functions and then compute the distance to walk forward using the square root functions, and multiplication, addition and then complete the equation to make the robot walk forward. So that should have given you enough time to out quickly and if not just pause this video and just jot everything down there and if I'll close these then we hit the play button on our robot we should it turn and walk forward.

I'll position this better so you could see and play and as you can see it is doing its turn and then he is walking forward. So we know the code is working nicely. We are doing it again to double check. And he's up, stands, twisted around and walking forward. And that's it guys. Well done guys, you can now get your NAO Robot to turn and then walk to a point, by using your Python programming skills.

Now have a play with this behaviour to see nao robot programming python you can nao robot programming python your NAO to walk in a giant Circle! Now if you liked this tutorial and nao robot programming python to see the next one nao robot programming python the collection, then please hit the Subscribe button and keep update with the latest videos nao robot programming python come out.

Please have a look below, where I have put links relating to this videosas well as other information about the NAO Robot. If you have any questions or want to see any other related tutorials, then please write me a message in the comments section, and I will see what I can do. Have a play guys and use your imagination. And I will see you next time.