ROS Robot Operating System with Arduino | Anirban G. | Skillshare

ROS Robot Operating System with Arduino

Anirban G., Founder MieRobot

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
14 Lessons (1h 33m)
    • 1. Introduction to the wonderful world of ROS Robot Operating System

    • 2. Secrets of ROS Core and ROS Node

    • 3. Catkin is not that tough - Write your first ROS chatter application

    • 4. The simple code which did the trick!

    • 5. What is teleop, rqt, twist and geometry message in ROS

    • 6. Lab - Running the TurtleSim Part 1

    • 7. Lab - Running the TurtleSim Part 2

    • 8. The secret to interface ROS with Arduino aka ROS Serial

    • 9. ROS Serial approach & architecture with Arduino - Ros Lib

    • 10. ROS Serial and ROS Lib Installation in Ubuntu

    • 11. Lab: Arduino as Subscriber of LED Toggle with ROS

    • 12. Lab: Arduino as Subscriber of LED Toggle with ROS

    • 13. Servo with Arduino - Plan of action

    • 14. Lab: Arduino with ROS Serial and Servo control


About This Class

Welcome to the world of learning Robotics! ROS stands for Robot Operating System. Technically, it is a meta Operating system for modern Robots. Robots as Hector Drone, Husky, R2D2 and many more runs with ROS. Even NASA's NASA-GM Robonaut2 has a ROS Simulator. 

This course teaches you the basics of ROS by using the TurtleSim (a small robotic simulator) and then teaches you how to interface ROS with Arduino. With ROS and Arduino we will see how Arduino Uno can act as a subscriber and publisher and finally use ROS commands to turn a Servo. 

This course comes with a Virtual Box with Ubuntu and ROS Indigo installed to get you starting and save your installation time. ROS Serial has a section which you can see and install yourself. 


1. Introduction to the wonderful world of ROS Robot Operating System: welcome to learning gross robot operating system the easy way. My name is an urban chaotic, and I will be the instructor for this course. So let's get started with the approach will follow throughout the course. Our approach for this course is by learning by doing, we take the fast lane for applying Ross through projects instead off spending a lot of time on the series. I'm not saying that you're is they're not important. Ross is a very complex subject, and hands theory becomes much more important. But what I have seen that two things that stop students from Learning Rose are the complexity in installation of Ross and the world Will Ming amount of theory, which is there, which is bit complex for starter? I struggled in my one way in learning Rose and hence have come with the courts in which have been logged this first lane in which will first do the practical off a particular Ross feature. And then we'll backtrack and see what actually happened. And how is the theory applicable for that particular concept? I would also encourage that in this section, which is section one, you watch it irrespective of whether you have done or not done the roast installation. I've taken off the Ross installation from the court lecture so that you do not get confused or get de motivated by the installation steps that Ross needs. Okay, so let's get cracking without for stakes. First Ross example right away in which will develop and run the chatter application, in which you will have one robot application, which will send out a stream off Hello, World of Message. And there will be another reward. A application, which is the listener application that would listen to that particular message. How vital. By running it, you'll have a visual idea about what it is coming, and I'll be using that visualization to quote you and make you understand the concepts off raw school Rose Node Roast, Rand Ross Topic, Ross Message. The opposite approach would would not be so effective, because that would be starting with theory. So let's go right away into their demo on logging into Ross and see how to run this particular chatter application. So I just logging into my, um, uh, Ross console. So I have an installation of Rose here, so we're logging into Ross and The first thing to do is to run raw score, which is the Ross Ah court service or the core engine. So just start typing. Raw score and boom are Ross Angina should be running on its running. So what we do is now we'll create a new terminal for our for our chatter, application and run of the server, which will initiate the talker service, something that will send out the message. And so let's run it. Let's type in Ross run, followed by the package name. Now it's OK if you do not understand this command, because there's the whole intention off force running the application and then going back into the theory. So here I have just initiated. As you can see, this is the first report application, which is sending out a message off Hello World, followed by an incremental number, which is a serial number. We need to open another application which would listen toe this particular message which is going on going out, and this is similar to ah socket programming. You feel for that? Done it in a Java or dotnet. Okay, so rest run another rose run and this time will give listener. And as you can see, this application is saying that I heard Hello word. So this is the first basic hello world example in Ross, which I have demonstrated right every tour towards you toe towards or towards you. Andi will be now going back into the next lesson and they will see the nitty gritty off this application and whatever the core concepts that we used for running this application. Andi will use this as a foundation for making the coming seven robot applications in this court's thank you for watching. I'll catch up with the window next video. 2. Secrets of ROS Core and ROS Node: welcome back. So let's get started on what is Ross now? Raw stands for robot operating system and it is actually a meter operating system and it requires a host operating system. So let me explain what that that line means emitting operating system. As the name says, it sits on top off a host operating system as a guest. Okay, so it's a noise over a noise, Which is Ross OK, which means to run Ross, you cannot just have Ross into your robot. You need a host operating system in this case in our courts, they told them, Be open toe on over. Wouldn't toe were also being stored, so it access it made operating system Well, what? Our host operating system. We just won't be in our case, Okay, Ross is multi lingual, peer to peer distributed and light with Multilingual in the sense it means that you can called the Rose programs and C plus plus fightin on lips on DiSpirito beer, which means one Ross instance can exchange message with another rose instant. It is distributed, which means you can have it running on multiple the machines at the same time, which means one machine can have the server another Mason have can have multiple clients running into it. And it is a lightweight, which means it has a rapper on which Ross runs Cross, is open source and is under the BSD license. So it's free both for companies on for universities and for individuals like me and you. It is spending by a non profit group, which is called as the Waste our F, and they run two. Major Project one is Ross and other is Gazza Book, which will be also seeing into this course on always out of stands for open source robotics formation. Now inside Ross, there are multiple companies on universities which have allowed simulation off real life reports within Ross Environment, and some famous reports are Turtle Board Baxter, Hector Crazy file people. So we'll be seeing some off this reports into the entire duration off our course. So that is really cool, because you don't have to buy this report to actually run the simulation. You can run the simulation over Ross and have a feel off the actual robot without actually buying your So that is one great USB or value proposition that Rose gives you OK, And you can also simulate a real life reports in Ross. As I said, And the website is Ross door. I would if you remember, the exercise which him I did on Lino running the chatter replication. And the first thing I did was run the Ross court service on just to help you recall, I'll run it again. So I just went here and I typed in a row school. And as you can see, these things happened. So what are these things that happened and what is actually happening in raw score command ? So the raw school command launches multiple things as you can see it. And it gives you a somebody saying that, um, Ross, long sober, initiated at the local port number triple for 80 And then it gives you parameters like the rose distribution and devotion and the North, Which running. Okay, so let's see this because this is the first thing you need to roll. Know about Ross. Okay. The raw score is the mandatory service for Ross Ross to run. So it is the Master Master service, which which need to run for all all your other services to get enable So if you do not run Roscoe, nothing will happen. Okay, You run. Draw. Score by the command, Roscoe, which just did. Okay, now, when you when you run, draw scored. It starts up a couple of things. One is the Ross master node, and another is the Rosa Perimeter Server, which is the Ross Ross score. Which it Ross lunch, which you can see here on the perimeter server, which is here. And then also, it gives you the Ross out, which is the log log note or for the roast master service. Now, what is a perimeter server? Perimeter server stores and retrieves perimeter return time, which would be used by other services which are using the raw services. Okay, so here in the in this case, the parameters by default, other destroyed, and the version So this will come out every time you run Ross school. OK? Roscuro also manages the communication between north. So all the subsequent Nords that you will be running up will communicate with the raw score and every nor will register with the raw score during start up. So that brings her toe the next question. That what is it? No, the North is an executable program that you run. So example, you might have a program which is retaining C plus plus. And another program, which is written in fightin. The C plus plus program, runs the mortars on the servers off for the row board. So then brings up toe ups toe the next concept that what is what is the Rose Ross node? Now? Ross North is a is an executable program that that is referred in the Ross language as the note. Okay, it's a single use, single purpose program. Let me give you an example. Suppose you were having a report, which is an obstacle avoidance report, and you have to programs. One is returning c++ and the other is written in a fightin. The C Plus plus program drives your models on the Fightin program drives your ultrasonic sensor, as you can see in this dragon. So each of these two program The 1st 1 which is written in C plus plus, is in Lord, and the 2nd 1 which is written in fightin, is also in old but bear in mind. It is language agnostic, which means no one can be written in C plus plus star that can be written in biting. And both of them have to do a registration with the Ross Mustard when they start up. OK, so that is the fundamental concept of Ross Master that once you start Ross Master, every individual lord opens up and registers with the Ross Mustard. Okay, Northstar executive, unless they said it's actually a program. Ross called the program a za north on their compiled as an individual program. Norms are also packaged into a folder, which is called a package, just as you do it in Java. So a folder in which you have the Lord's assembled is called a package. Now it gives a lot of advantage in the way Ross Community has intelligently decided this concept off. No, the Nords and Ross master is that it moves from a single monolithic structure. When in what you mean you have a single program controlling everything. So if you have done Audrina or microcontroller programming, you just write one program on that board, you cannot write multiple Arduino program or multiple microcontroller program in one microcontroller because of my microcontroller will only run one program in an infinite loop . OK, so it moves every from that structure because you cannot actually make complex reports using one program, so you have limitations. It also makes it for tolerant, which means imagine the robot is working in the real life and the sensor feels so. Even if the sensor field, which means no two will go down, you can still retrieve the reward by using the Nord one and called calling it Back to the Base. Although the sensor is done, that was not possible in case off a monolithic structure because everything is quoted in tow one program. So if you get an error, the robot fields and it does not work, the other functionalities are do not work. It reduces complexity off the reports because you're decoupling their features and the programs with the concepts of multiple node and you're calling the nodes as and when it is required. They were not running it every time. In an infinite loop, you use it when you need it, okay. Now the client regularly can be used with C plus plus and Ross by which which is raw. CPP and Ross Ross Pipe and the Client libraries are written both in C plus plus on fightin and I they said You can have one Northern running on C plus percent. Another Nord running on heightened essentially means one program running on C plus, plus another program running on fightin. Okay, now let's see for this particular example, how can we retrieve the North? Sir, that was running. Okay, So if I go here and open a new terminal on beer in mind, my Ross Ross score is only running now. Onda let me see off retrieving the Lord's. So if they just typing cross mold, at least this is the second command that you would run. And it is just telling me that I only know that it's working the Ross out, which is the log north for the roast master. So let's do one thing. Let's run on the talker application again and see how it changes. So run the talker application and let me read on the Ross Northern list. So I pull up another terminal and lest I've been Ross more list and you can see that we have their talker application showing up here raw salt and talker. Okay, Now let's some try to run the listener and see if that also gets listed so well, we owe Ross run again and listener is working. And let's open another terminal. So in Rossi off to get used to the habit. Off opening. Ah, Martine Pillar Terminal. Okay, on this time if I give ah Ross Nord List, I fixed the 33 notes on As you can see, Viola, you have the listener talker on the Ross out. This basically tells that three North are working. One is master oneness listener and one a stalker. So we have learned local mines here. One is the Ross Nord list On another is the raw score. Hope this was helpful. I'll catch up with you in the next lesson in which we look at the directory structure. 3. Catkin is not that tough - Write your first ROS chatter application: will you come back in this lesson Will see and continue with our previous example of the talker and try to build upon the theoretical concepts needed. So the thing will see in this lesson is the cat kin of a system. Now, what is catkins Catkins the Ross Bill system in which, actually, you build your so Scordia labrie your executable sealed interfaces. So this is the according build system which helps you toe create your own custom files for your robots. Okay, Captain Maker is the command to make it. Atkin walks peace, okay. And workspaces nothing a zoo have in any standard, and I d is the root folder for, or doing our roast work. Go and check out the installation section for more on how to set up your cat kin bill system. But for now, let's go into my get in the folder and try to understand what are the basic folders that comes in this particular route for the on a few words of warning about what touch and what not to touch. So when you move into inside your, um, cat can work space, you generally see four folders. One is the build one is the devil. One is a serc and the other is they installed. Let's see them one by one. Now out of this four folders. Three folders. You should not touch it. And do not mess around with it. Because you, you you there is a chance you might mess around with the installation off Ross. The only folder in which you should be working is a start. See, now you have to take this red flag very seriously. Was when I started myself. I player played around with these folders and messed up my installation. So please do not touch anything which is there in barely devil and install. Always do your custom walking. They certainly folder, which is the source for that. Now, what is the Bill folder? Bill Folder is where see Make is involved. Now If you, you know, see make is the bill process on which you're courting works You can go to seem a short walk dot overview to know more about C make if you are interested in knowing the theory about C make. So since CPK is involved in the builder folder, do not touch it because it will mess up with the installation. The bill targets are are done on the next folder, which is the Devil folder. Do not does that as well. Install folder has the scripts and the library and the TC folder. Do not use it occasionally. You might, but generally do not. The only folder that you need to work on is the dice 34. Let's see this entire structure in my set up in Ross. Okay, so I just log in. And as you can see, I'm in my home. In my home are directory off 12 And this is my cat Kinnel workspace. And here I have this build devil installed on the SERC. You can have other folders as well, depending on what installations you have done. But militarily will have this 44 folders. So what I'm trying to tell you is that do not do anything inside build. Do not do anything inside devil example. Don't go and create a new folder here. Okay? Andi, do not do anything under this install folder, okay? What do you need to do is click on the SRC and this has all of your directory and your packages, which you have configured. So you have to create your new ah simulation, your custom code code or your route folder for your development in this SFC for that. So the party's captain workspace is RC. Okay, Now how to set up this Captain workspace that is shown in the installed section so you can call later and do it yourself with your nor done here. But all your custom coding a new route for that has to be set up in SRC. Okay, this is what I intended toe tell you in this particular slide. OK, so, um then the next concept you should know is about Ross package and run. As I showed you in the previous thing, all this were my Ross package, which is nothing but an directories which drive from the Ross package part which have set up. And this is actually the folder, the root folder toe store. Your custom codes your data State library can fix okay. On dis created under the SRC folder. As I said Now, what was Ross run? If you remember the previous example of the talker application, I used Ross friend and he just ran on. And one thing I noticed that I did not migrate were directly. I don't did not to change the directory because restaurant actually allows you to automatically find executable from apart without giving the full part. And that is really cool. But what I do is that I try to run the talker example again without giving apart, but this time and not run a the C plus persecution off. It'll render a heightened version without giving the full part. So let's see and let's moving up into our Ross Terminal. So here is my Ross Terminal. So generally I was giving Ross run raw CPP thing. So this time we stood off doing a C plus position. I will run the fight inversion and I'll not give the full pot. As you can see you, I am in the home directory and I have not moved into the absolute directory part. And this is what roast Ron comes handy because you do not have toe. Remember, you're part so you can give Ross Ron Ross by the score. Do you know, rials just give talker. And as you can see, this is working, which is a fightin by 10 version off. So this is water. Rawson Ross, Ron Waas A command to run a runny Oro executable without giving the full party given arbitrary part on Roseland. Rancid. The next thing to see our Ross Topic and Ross Message. Now Ross Tropic is nothing but a bus for the Messager toe. It's like a channel for the messages toe communicate. It has one toe in mapping. So, as I said, you know, you have one talker and one publisher, so it it walks on the concept of publishers and subscriber. So publisher is like the silver and the subscriber like line on bear in mind. You can have multiple a subscriber toe the mean publisher so you can have one publisher. You can have multiple clients listening to it, which means you can have multiple subscriber, and the relationship is oneness. Toe end. Now, the question that comes up is that how do we see a Ross topic? So Ross Topic er can be seen with the Commander Ross Topic list and let's try to run them and see what we can do with Ross Topic and how do we visualize it? Okay, so my Ross Core is already running in this terminal, so just let me run Ross topic list, and you can see that only my Ross out terminal, which is from the raw score gross score is running. Not only run both their talker and listener and see waas, what is the roast topic now that gets listed out apart from the raw score, which you have already done. So I around our talker application again, which is the C plus plus portion. And inside another terminal I run the listener, which is here. So both my talker and the listener is working under the under the chatter. Our topic. Okay, so if I go now here and try to list the topic as you can see the chatter topic it's shown here. And, uh, just for the sake, off clarity, I can also do the Ross note and you run the node. It is the talker on the listener. Okay, So, to sum up, you were having two nodes running, which is the talking and the listen report from on the roast out, which is the raw score by default on the topic that is used, which is the bus to communicate. This message is the topic chatter. OK, so This is what I'm I was trying to explain in the Rose topic cooking. So the next thing is the concept off a message in Ross. Now, Messager are used when the North to communicate to each other by pub publishing messages to a particular topic. So message would be would would hang on to a particular topic or a particular buses. And like any any message, it would have Structure of interior, bully, bully and string. OK, now you can see the messages and also create your custom message, um, toe to latch on to a particular topic. So let's see an example again. So if I go back here and give Ross topic, um, equal Cetto and as you can see it is showing me the data, which is, you know, we just coming in from the from the Jeter. What we can do know is that you can write our custom message something like hello from my report and put it inside the talker so that you know, this particular one message goes inside a hello world. Okay, so let's try toe or do it and you can open up a terminal on bond. You can give the Ross topic Publish Toe this bus, which is the chatter. The standard message context and the data type would be string. And the data is have Hello. My report within, Within a single court. Okay, How this message will get embedded in the bus off the chatter. And as you can see who run this, this will latch it latter, toe the service which is coming here, and you'll see it coming or toe the listener here. Okay, So if you know or scroll up, you will see that somewhere. It has come with your custom message, and as you can see it issuing that, you know, I heard this. So this particular message has has been delivered because you give a different string instead of hello world. You typed in. Hello. My report, Which was which was here. Okay, so this is how messages and our topics work. I would suggest him now. All of you toe goto the installation section, install Rose, Set up your good hub on your captain. I try to run what I have told you in section one in section toe directly. Go about and start creating our reports. I'll catch up with you in the next section. 4. The simple code which did the trick!: we'll come back in This tutorial would like to see the court off the talker and the chatter application, which we just executed. Now there two warships off the court that comes in build. Um, with some standard packages off Ross one is the C++ version, and one is the fighting version. So in this video will be looking at the biting version. The package name is Ross by underscored our tutorial so you can grow city ferocity will take you to the partum off the folder. So roster de raw spy underscore tutorials and it takes you inside into the part where this particular packages which is roast by underscore two drills. If you're listed, you would see that there are a number off folders which has the courts into them. And what we are interested is the one which is here, which is the talker on the charter so less changer directory into this folder on D. C. What do they have? And as you can see on data there to fight and file which a listener don't buy and talking that I have a look that the color is changed, which means despite and filed start executable which means in case you create your own package. And if you want to put your own fightin files, don't forget Toto ch more than converted into an executable in case you're writing your own custom court. So let's first, um, open on the talker application on. I'll just nano it in tow. The talker or door file by file. Andi, I just scroll down on quickly ran you through the court. Okay, Now, this is a very small and simple quarter to understand. For the talker application, we just say the hello world now the official documentation for this is it at this year you are, which will be porting putting across in the courts as well. So it's a wicked or cross daughter. Come on, then, followed by Ross Ross by underscore tutorials. And this has all the steps, which I'll be talking in this video, and you can go and have a local in case you need a further hand for their explanations off the court because they have explained it very beautifully. Line by line. Okay, now here. What we're trying to do is we're trying to first create in old, which is off the talker and also publish a message. So for pie tend to work inside Ross, you need to import Ross by library. So that's the first line of the court. The second line off the quarter is actually the missus type, which you would be using for the chatter application. And it's off the standard of Mrs type, which you're importing, Um, a string. And here in the next, a function which you have defined as a talker function, you were actually assigning a topic, which is the chatter topic. Andi, you are putting it off, Mrs Type a string which would declare the on the top on the Q side stand, which is the lens now, This is not applicable for the indica abortions. We This is only for the latest versions. For my instance off, Rose, this parameter is not doing much. Okay, Then we had initiating the norther. They said on that is the main objective and the name of the notice talker. Well, we give another more physical truth, which means that you can have a science and unique number after that note so that, you know, because all to our north cannot have the same name, so the system will sign your number after the North so that you can have multiple instances coming up. Now, the next is raw spy Daughtry, and the value is stain 10 hertz, which means 10 times per second it will go. So if you want to slow it, you can make it five Onda, change it into your custom code if you want to write it and this will this will continue. Continue Teoh Print Hello world. Till that time, an interrupt which is control, see is is pressed. Okay. And this is water. The last part of the court does in which tries to catch an exception in case it happens. So this is a very standard chord. And like I said, if you need more line by line explanation, you can go into the official documentation and have a look into it. OK, now let's some exact it and see um the, uh, listening because the doctor we looked at the talker. So it was talking about Bi Onda will do an animal, the listener as well, So make sure you don't We're spelling mistake. Okay, Onda, here is the listener file and what you to do is that it follows just like the previous one . Just it has an extra callback function for printing out. The message that it received with M s is that I heard and it will print out. I heard. Get it off. Get a Which is, if you look at the talker, it would be hello world. Okay. And here also here you have the listener function and an animal's is true. As I said that due to the unique numbers, So you have multiple listeners running simultaneously, and it's subscribing to the same topic, which is the chatter, chatter topic. And this will go and run till till and until the naughty stopped with control. C control. See? So this is about the quarter off the chatter on the talker Onda and tour to run it. You can just go back to your captain workspace and you're gonna give the standard Ruslan Command, which is restaurant followed by the package name, which is roast by underscore. Are you two reels and followed by a talker? But if you give this evil, get an error, any reasons, white because you have not initiated the rose court. So I just opened a new terminal here and, of course, toe run the raw school so so that I don't get in a error so yourself. I have run the raw score, and now I'll run the talker. And as you can see, the mockery, Saronic and all I have to do is create a in new terminal. And here I will pour toe the listener, which is Ross Run Ross by underscore tutorials. And as you can see, that it is It is listening toward what we're publishing. And it is saying that you know, I heard Hello world. So this is how you can navigate. And you can also create your own package and a copy the quarter from the health fight and create your wound version offered because this one waas standard Onda and hope this was helpful and I'll catch up with you in the next video. 5. What is teleop, rqt, twist and geometry message in ROS: Welcome to the next section on in this section will go hands on and learning new concepts using the total same report. And we finally bring the calliope we think, or using the keyboard. But I did introduce certain new terms like Tell your turtles him. So let's see them. What a day. And then we go into the hands on section. Now, what is the total report and what is the turtle? Same turtle robot is actually a report, which is there at a total board dot com in the u. R l. And as you can see on the images on the left, these are actual physical, tangible robots, which you can buy. OK, now, startle, Seem, is the simulator off the turtle board to actually from a top dimensional view in respect off that report, And it looks like a total simulator off this report, which looks on your right. Okay, Now total seem has been inspired by this turtle board, and it's it's a tool given by the Ross community for us. Our toe run, the loan, the basic functionality off rose. So there's the intention off, turtle. Same. And it has been inspired by the turtle boat. Okay, so you can go to the sea Worrell, which is in your total board dot com to actually see this reports. One thing to note is that totaled Sim do not get installed by default, so you have to do so. Do have get installed. And then put your rose version and installed turtle. Same. Which means if you're on indigo, just put Indigo. If you're on a different version of Rose. Just replaced Indigo with the notion of Rose you are using and turtles him will get installed. Okay, now, I did say that will be doing a tell you up or using the keyboard. So what does that tell you? Mean, Tell Europe stands for telly operations. And it's actually another term for remote control and used widely in the in the field of robotics for controlling a robot, especially a mobile report from a distance. Okay. In the example, you can see that there is an army best, a report which which detects IED's and bombs on your left. And for sure, the soldier or the difference officer has to control this robot from a distance because he does not want to risk is right. There's the whole intention off this robot and he can tell you hope it. Onda use this robot to deter near a bomb. This is another simple example of off a reporter that I made. And I am telling hoping I do that hourly up off this robot using the joystick controller on This is an Internet of thing. Robot, Check out my courses and you There is a course on how to make this report. But essentially, this is that also tell you because I have a camera feed and enjoy stick to or to to control this sort of water, water distance. So basically will be doing a tell you tell you off off the turtle, same robot, the next concept to look at it and we'll come back to the slide as usual. Just like the previous section when we do the hands on is our Q T OK? No, arguably is actually a duty breast framework for your a graphical user interface. And it basically shows you are the inter operations between your notes and topic, which means, um, you have, ah, the North's which air which air here and the relationship between the North which is the topic. The bus, if you recall those kind of visual illustrations, can be seen in our Q t. OK, now it comes with a three part, which is the base package off our beauty, and there is a common plug in, and there is a roboto plug in which, which are plug ins used for interacting with the robot during the run time. This comes in handy to see if actually your correct notice calling the character topic. If your publisher and subscriber settings are actually correct and when you have multiple A Nords running this feature comes in very handy. Okay, now this also does not get installed by default. And there's a commander, which is sudo apt. Get install, Ross Indigo argued. Go and check in the installation section and to see how our Q T gets installed. But it does not come by you. Default will be looking into the ark you to section as well and come back to this light or to form our concepts. Okay, the final thing we need to know is about the gym, a true message and especially type of geometry message, which is called us twist the water Demetri messages in draws. Geometry messages are messages which which gives the common geometric such as, you know, records, points and poses. So if you want to see the velocity geometry message can give you the angular velocity and the linear velocity off that particular robot. So it comes in handy. Okay, But when you are trying toe when you're trying to establish geometry, okay, so geometry message comes in handy. Twist, as I said, is a type of geometry message in which the velocity is broken up into linear velocity and angular velocity so that you can see what are the values off the linear and angular Veloso becoming? And you canteens those perimeters and hence changed the Canham itics off the robot. Now, this might seem overwhelming because I just talked about theory, but as usual, I'll I'll do some hands on and come back to the slide in the next video toe, form our concepts which we have learned. I catch up with you in the next video 6. Lab - Running the TurtleSim Part 1: Welcome back. Now we'll see the simulation off their total same which we had covered in Curie in the previous lecture. And I tried to correlate the theory with the hands on. So first will run a They're also Master Onda as usual type in the Ross School. So our Ross Master Nordea's running. We opened up a new terminal. I know. Look, just toe revise. What we have learned so far will do a Ross nor the list. Any guess what will show up? The roast master is as usual. And then we'll also run the Ross topic and we're list and you can see that there is only one Ross Northern one draws topic running because we have not run anything else? No, As I said, you need to run Install or Turtle Simitis norther installed by default. But you can check if it is installed by doing Ross front and just type in the total and press the tap twice. And as you can see, it will show you what are the packages with the world total and even see on top? I have total same which is installed here in case your room. If you do not see anything on turtles, and you have to do so. Do apt get install with your Ross flavor for meat is indigo and just type total. Same on your roster. Tulum would be installed. Now that my roast or total is installed, the row same is installed. Let me run it. So to run, it will do. Justice Ross Front followed, um, by the package name, which is a total sim and followed by the North name, which is total underscore Turtle, Turtle sim underscored Lord. And as you can see, you see this blue background or turtle simulator Now your turtles or turtle can be different from mind if depending on the bush and the look and feel off it. But as long as you're getting a turtle, it's fine. Now let's try to open up the another terminal and try to see what are the changes we see in the Rose topic on the North after we have run their total same. Okay, so we'll go here again and type Ross Lord list. And as you can see, the total same is shown here. We can also see what out there topics which is there with this turtles Him, As you can see on there are three topics which is CMD velocity color, sensor and post. So it means that there are three topics. Associate it with the are turtles are turtles. Now, let's try to see more in tow this Ross topic by going into the help. So to get the help, you type in a hyphen h with Ross topic. And as you can see this not the multiple options you have with Ross Topic mainly equal find hajj, which is for the rate list Bob and type. OK, so I just clear up the screen, OK? No, um Let's see one by one. What? What? We can do more with the Ross Topic. Example. Let's try to take in four for this velocity. So if I again are do the Ross topic less Know what I mean to say I need to get details about this turtle one cm the velocity. What? What does this topic actually have? Sort of cedar details off this Have a level Ross topic. What you can do. You can give Ross topic in four followed, um, by the part, which is a total one on don't make any spelling mistakes. Cmd under school will. And as you can see, that there are subscribers, there are no publishers, and the the subscriber is are turtles him. This is happening because we have nothing to give the velocity or tow this simulator. Our keyboard is not working or joystick is not a types. So we don't have any publisher. We just have Ah, the subscriber. Okay, now there is another topic which is the post. And let's try to do it same. And this time we change it toe pause and let's see what happens here. You'll see that there is just the opposite in which we do not have any subscriber, but we have the publisher. This is because the orientation the posts off the report off turtle seem is already available. And as the reason you have a publisher, you do not have any subscriber, which is, um, have a living. Okay, Now let's try toe, see the type off it so you can to see that type off it. You can just give gross topic type and again a give a turtle one and followed by cmd. Underscore Well, and as you can see the topic, the type is placed a message. And this is exactly what I was talking about in my previous lesson when I was talking about geometry, message and post, which you can see here. Okay, so, uh, and you can see that it's the type is geometry, message and twist. 7. Lab - Running the TurtleSim Part 2: Welcome back. Let's see, What more can we do with the turtles? Him. So we run the turtle simmer again on we have already seen about the twister messages in the previous video. So what we need to do is that I see more details about this tourists message on to see that we can go. Ross Michigan's show Geometry underscore Mrs Twist, which we did in the previous video. And if you see that it has bought off the linear and angular velocity given for the gym a tree messages. Okay, Now watch. Now that we have seen some some details what the total same. Let's try to move it using the this twist message. What we need to do, we need toe. We need to publish the Ross topic. Onda, give give the perimeter. So whichever needed something like this, we can we can give Ross Topic published part and warned cmd velocity on. Then refer are the geometry message under twist and give the X prize the coordinates which is needed. So if you give it and you can see that you know the turtle moves okay, you can also change change The values like this was 3.8, and I changed it to 1.1 point eight, which is the Z value on. As you can see, the angle in which the turtles moves will change. Okay, now that now that we have run our roster total by giving the physical according, that's the reason That twist, I said, Let's see how we can control it for the keyboard so you could just do Roslyn on, then followed by a turtle. Since then, you need to call total. Tell your recall, like talk about, really tell you off the previous video on you could see that it is telling us to use the care Iraqi. And if I use the Iraqi, the turtle seem moves. Okay, you can also see them our beauty graph for because, you know, opening so many terminals can make it confusing so you can see the Ark UT grab just Ross run. Our Q T underscore grew up on, but he had no limit. The package name is the same, so we'll just repeat R. Q P at the school growth on. If you do it, you would see that Ross are photograph Will will pop up and it's here now, as you can see, that, you know, we have the calliope running on it is with the cmd velocity and it is controlling the turtles. So I hope this was helpful, and I'll catch up with you in the next video. 8. The secret to interface ROS with Arduino aka ROS Serial: Hello. One will come to the next project wherein we'll intricate Ross with our tree. No, Now our journalism Very popular. Microcontroller. Andi testing the weigh in weight you open, sold some on especially robotics has come up in the last five years. It doesn't mean the robotics really accessible for everybody around this world. So it is very important that we see a concrete implementation off Ross with the artery. No, this is also comments on a request from multiple students. So let's get cracking on a simple way on and an interface between Rose and Adriano. Now, one thing which came to my mind when I was shooting for discourses that the thing that the Rose community gave and the message which is there is that not to reinvent the wheel. And and Toby Smart Well, progressing towards robotics now. Ah, lot off for the interface, especially with our Torino on the commonly used sensors are already dear Azaz drivers, so we need not write it from the scratch. OK, so here is one cartoon illustration off the primitive age of humankind. When there is a dude saying that you know Hey, why don't you try this wheel it's round and probably does the job. But the core team is very busy with square. Well signed the central. Thanks. So we need not be like that team, but we should We should try toe reinvent. We should try toe. Avoid reinventing the wheel. Now, the interface or how we rule use Ross without Reno is a through a protocol, and that protocol is called raw cereal. Okay, so number one concept is that we use a protocol and that ridiculous raw cereal. Now, as I said that we need not reinvent the wheel, especially if you are trying to interface commonly used microcontrollers Aston cxb are green or even STM 32 boards. Most of that stuff are already written, but yeah, if he needs to use certain boards which are not already there in the rose cereal, then you need to write your owner interferes between Rose and the hardware. Okay? But as far as Arduino is concerned, we will go with Ross cereal Now, within the raw cereal, we have raw cereal flank, which is the client side implementation, and it is designed for microcontrollers to run with Ross, and it is based on C plus plus on for our Reno. Specifically really? We have the package which is raw cereal Adriana, which I was seeing now beyond this, um, we also have to severing the implementation off serial which which he termed as interfaces in the roast wiki. Now the fight and implementation is called raw cereal fightin and this works quite well. There is also a C plus plus one which is a bit hard to use what it is recommended for high performance application on robotics. So in this entire project and section will be using fightin and especially will be using the silver implementation of beytin using Ross Syrian fightin now finally in your artery know our border the beast library which is the dependency which which has which has to be installed for all the tools and claimed libraries and also for generating the messages and services which are understood by Ross. The library which we need to install, is called raw slip. And as you can see that if you could your example examples libraries We have used our Reno I d you would understand and you'd see this roast lib library which would be which needs to be installed and within this he will have some example. Example Courts. Okay, so this is the base depend dependency that needs to be installed. Now I understand that this was too much off information and it seems complicated. And the first go so long. Story short. We need toe use the Ross labor in Arduino because that has the Bassem packages. That also has the example courts which will be using mostly for the section and we'll be using a the fight and implementation on the server, which is the grocery in Brighton and Northern C++ abortion. Okay, now the architectural looks something like this. Now, if you have been to face our Drina when you write to a laptop which is running your rose, first of all, are you connected with us? Be so that the serial communication is placed. And after that, obviously you run the raw score, which is the roast master node. And then you can have your laptop. One wheel for doing it is you can have the laptop as your publisher, Onda then and you can have your Adriano as a subscriber. And as I said, you can have the most serial underscore r Reno which is Adriano courts for Ross cereal, and you can use the geometry message or censor message like the twist to message or empty message, which we saw in the previous state toe Not only read, read and write subscribing publisher from our Drina, but also control sensors like you know, a servo and ultrasonic sensor. And finally, you can use, um, on the Ark UT graph for visual addition off what has happened in terms of interrogation with Adriano. So what is key to understand that you know would be using the USB for the serial messages, and then the Rossley based library has to be installed and the protocol would be raw cereal in the school, our dream, which is a subset off raw cereal. And then we use the sensor message in the geometry message using to a strange etcetera, as we did in the previous reports, are to control control the sensors serve or even a DC motor. So hope this was helpful on by catch up with you. As we see in the next tutorial. How can you use on Drina Boat as a publisher on as a subscriber? I get up with you in the next video 9. ROS Serial approach & architecture with Arduino - Ros Lib: Welcome back in this video we'll see the implementation approach for interfacing our dream of borders A publisher and subscriber with rose. But just in case you're totally new to our Torino are you know, Elektronik scared and grade interfacing with microcontroller on some basic robotics by pro provided some links on some foundation on servos DC mortar ran a C zero for our train Sonic Thanks. Okay, so go ahead and just treat them toe. Get your foundations. Right. But if you have already used Arduino to control servos DC Motors sensor or some other microcontroller using to control servos DC Motor etcetera, then you can skip that. Also, you have to make sure that you check out the installation section on the roast. Lived because the courts, which will be using, would be from the Ross Lib examples. Okay, so let's proceed. Er, the first use case in which Arduino is a publisher. So what you are doing that we'll have a chord which will publish the standard message. Hello world. Um, in any finite loop and it'll it will publish it the chatter topic. And then we'll have the laptop, which is running the raw score and the master note and it will listen for that topic, which is published by the Audrina. And then if we can hit it with the standard and message in Ekho and just like the example which we do in section one on chatter you can see you can hear the hello world coming out. So in this case, are also access a publisher toe the rose ecosystem. So sorry, I beg your pardon. Arduino acts as a publisher are to the Rosa ecosystem. Then Then we'll goto Goto reverse in which Adriana would be a subscriber Which means you laptop, which runs the roast master, will also have a publisher note And then it will publish a topic which is a toggle lady with the str message and yeah, in the arena board. As you know, being 13 there is a default up in where you have led. You can also connect an external led on the dark in the board will listen for this topic on will use the empty message toe, make it toggle the state off a lady. So if if the ladies off will become on and if it is only become off and you can latch. This message is a message with the topic for 3 to 5 seconds. OK, so it's gonna be quite interesting. And both the quarter standard courts, which comes with the examples off raw slip and in the upcoming videos, their videos, which does the country implementation off both our Drina A subscriber and a za publisher. Now, I would request all of you to go and get that cracking, because unless you get this right, it will be a little difficult toe interface with sensors more toward signed servos. Okay, so I hope this was useful and helpful. Andi, I'll catch up with you in the next video. 10. ROS Serial and ROS Lib Installation in Ubuntu: welcome to the section on installation off Raw cereal, which will be using for interfacing, arose with Adriano. Now we feel looked into the previous video. We saw that the implementation of raw cereal for Adriano is done with the raw cereal. Underscore Adriano. So we need to install this. No, the official great is given that this link and you'd also find it in your course video. You'll find that link now. There are two options off Installing raw cereal are Trina Oneness for installation from the binary. For some reason, some this binder installation has not worked for me, and I always install off from the source and it always works. So I tried to show both off them on the first time gotchas and walk around, which you need to do on, and it is often not so straightforward. Okay, so what's this video Carefully, and I'll be using the steps from the official Rose Wiki guide. Another quick tip I can give you is that was this video in a deck stop because if you watch from the movie, Udo soon lose the context because it's gonna be pure installation. So there is very little understanding that is required. You just have to execute the steps in open toe. And obviously you need to install artery. No, that would be the first step. And you can instrument from this link. And as usual, this link is also given in your course guide so quickly. I love moving in tow. My oneto instance on bond. Here is the link for installation off the artery. No, I d set up, which is the raw, awesome Ross Singular underscore Adriano. And here is the link for installation off Adriano. So let's start with downloadable off Reno. If you are using the installation off the virtual box that came with this court's, you would have it already. But in case you're using your own installation, you need toe go and install adrenal. So I mean on open toe. So I'll choose the Lennox 64 bit. And as it is downloading movinto my terminal and start a confrontation off from the Arduino on step by step. Now the first thing to do is try. Toe stole it from the winery, as I said, and if you score down to Section two, you would see that there are a couple off commands which are which have given toe install it from the binary source. So the commands are so apt. Get install, followed by Ross Indigo Rossley. Largely no. And Ros Indigo Rose cereal. Okay, Now you have to replace them. Now, they indeed go with your version offer also that you are using. So just to be just to be sure, you're gonna goto the terminal toe, check your Ross version. So the command is Rose portion hyphen D. Okay, so I just use it on Troy to you so that there is no no confusion about the question you are using. Okay, so let's were wait for for the terminal to open, so it has opened. So I'll do just rose portion, um, on a hyphen D. And as you can see, that I am using indigo. OK, so the first thing to do is copy door first command on, um, run it in your terminal, so I run it in my terminal. Just try to zoom it. Onda based it. And the password for pavillion boxes. Password with capital and give you a soda password. Give yes on and it will installed. So my Arduino has downloaded in the Donald for direct right click on extract here. So let me extractor in the same folder and then their beer install script, which we can run to get a dart Reno installed. So as you can see that I extracted the download or tar file, which, which is here now, this is our reno border. And inside that there is an installed script. All I have to do I goto this part on Bond run the install script. So I think my downloads folder is at the root. So let me just go and try to find it. So I am in the download folder, and if I do it less time, I can see the Arduino off order. So all I need to do is our Reno. Make sure you type. Where do you see? Okay. And if you do an ls here your dosh cedar installer script, which is here. So I'll just wear sort of so that I have the right and it is installing agree? No. So opposed a video and come back when this is installed so that you can see how dark Reno is stolen. And it is giving the done message. So you're gonna go to your search and type What type of r. Reno, and you're gonna see it installed. Just click on it and let's see if our Ross, um Libre package has been installed. Okay, so give it a couple of minutes open and post a video. So ideally, it should have installed the Ross live here bottom, as I said, And there, you know, with binary. It does not work for me at least. So I will try to install it from the source, which is the second part. Okay, so let's go back toe our wiki Onda, See the installation from sorts. Okay, so it asked us to move to our workspace, which is for us. It is Captain underscore workspace. So let me just clear it. And goto Captain Works piece? Yes, and then you talks me toe change in tow. SRC so I'm under the SRC folder. Now I have to get on this and change back or do my walks, please. So let me just copy it and basted and let it or cloning toe the source off. And then, um, I'll move back into my catkins because that works is asking me toe do now? You have to do, Captain. Underscore me. Okay, now this will re compile, and it will take some time, so I'll post the video. Okay, My installation is done, but has given by the Ross Wiki we have todo cat can make install as well. It is clearly you're telling here. So show miss the this tape, it will not work. So just go, Godkin underscore Make, uh, you start. Okay, so, um, installed packages. The next thing to do is open your order. No, I d on goto file on the preferences to see where your local libraries as I saved. So they say for me in this part, which is home, Meyer Abort artery. Know it might be different for you, so go ahead and check. And make sure you open the that in your file explorer and you can see the library's folder because we need toe goto this part to our terminal. Okay, So if I You if I show you the brochure on the Ross Link, you can see that in the next. In the next step, it talks about moving in tow your libraries folder. So I just have opened up the new terminal Onda navigate to my to my libraries folder. So So here is my art. Enough order. So I'm moving into our green wonder when they list and I have my libraries. So I mean, the library's folder. As you can see now, you talked us toe Remove if if there is a previous installation on off Ross Labour now that it's not applicable but in anyways, we're doing because is dead in the Ross Wiki. And just to be sure, so we just open the spot on, uh, basted Okay on here. We need to know that there is a daughter and then so don't miss the daughter on and off the command, because so you will have a problem. Okay, so just copy it. Andi. Mr. And this will export on a complete whatever is, uh, whatever is upending. Okay, so let's, um, post a video on a word for it to complete. Okay, has completed. What we need to do is that you need toe close. Close your artery. No, on restart your oneto instance. Okay, so I'll go here, down on, restarted on. I'll come back when the the restart has been done. Have completed the restart. And as you can see, the raw slip is installed. And the first thing we do is the hell award. And the hello World quarter is there. And all you have to do is connect your padrino so but make sure that, you know, as we did for the joystick, you go to your settings and USB, and your Arduino should be detected here just like a joystick. And make sure your USB controller is never on. You can also do a cross. Check it from us. Be here. Okay, so you're our winner should come here. So that completes the installation on by catch up with you with the concrete implementation off the publisher and subscriber in the next video. 11. Lab: Arduino as Subscriber of LED Toggle with ROS: Welcome back in this video. We'll look at the contract implementation off interrogation off Ross with our Reno. So let's get started. So first of all, you open your artery. No, I d And we need toe Start with deployment off off the court off from off our dream, Going to argue? No, no board. And then at the next step, you should also attach him your Arduino Arduino board toe the USB off your laptop before are doing that. Make sure that you go under devices USB and make sure your Adriano Pop Portis directed by the virtual box off Open to All Right. So I opened my artery. No, on, uh, let me just zoom it, make sure you're grossly was installed and you can see the roast lib in your example folders. And within Ross Lib, you can see multiple, um, for examples which are already given for the roast level, every and you have to open the hello world of program. Okay, so once you open that your editor will open with hello world program And make sure you goto tools on select the right port off your Arduino, which is here, and you can see that it is at Celeste ifs Last e t a c M zero. Okay, now, if you try to upload the court here, you might get authorization problem because you have not given the correct authorisation. So I just tried toe upload it. And as you can see, it gives me permission denied, as you can see here. Okay. Now, to travel short this it is very simple. And this is, um, similar to water. We did it for the joystick lessons. If you have done the joystick lessons in this course, you would be knowing. So let's goto this particular Ford and see whether they have the retried and advocacy. There is no retried given, so you can just do pseudo on ch more. So let's do so t ch more e plus r w and then give the but now form my laptop. It is a CMO zero. You might have a different thing. And I'm on a windows machine for Mac book. This will also change, so make sure whatever it's applicable. Oh, for your machine. You use that on, make sure that is correct. Okay, It looks me for the password. So So I put my soda password. And again, if I listed you can see that now I have both of the read write, which was not here in the previous keys. Okay, so I again lesser tried toe applaud the court and let's see what happens. And as you could see, it's uploading and applauding has been completed. Now, um, I would like to show you a link, which is the official or documentation. And the link is from the wiki rose off raw cereal Underscore art with your daughter on the tutorials so you can go here and click on the publisher example, which is the official documentation off this court. And if you scroll down to the end of this tutorial, you would Oh, see, you see the commands which are which are given toe run things particular for creating the pop about publisher and also toe see what the message has been displayed by the topic. Okay, so let's try toe run that so as usual. Oh, well, first run a raw score because score is not running. So let's around the raw score on and let's click a new terminal. Just a bullet here on Yeah, and probably zoom it Okay, Now, let's do, um, Ross topic list, and you will see nothing, because you will only see you'll only see the topic from the raw score. Now you need toe run on the popular publisher because your artery noise them are transmitting the hello world of message. Now you can go back to this website and it was called down. You'd see the commands because so you have done. We have executed the raw score. Now you have to do the restaurant followed by the package name which is rose from the cereal on a full order by the fightin implementation of the server application off the serial communication, which is cereal underscore in order to fight. Now, this is the standard fight on implementation for the server. So you need not go inside and look into the court. However, you couldn't do a row city and go and see the court sport. This is the standard one. And then obviously of toe interferes. Um, the port which is a correct cereal porter toe to interface. So let's run this. So the first thing is Ross front. So let's go back in tow. The terminal Onda alerted with Roseland Ross run, followed by Ross Serial under School. Fightin on the the implementation name off the savory cereal underscored Nord, and we have to give for the pot, which is deaf TDD white. And as you can see that it is, it is. It is setting up the so the setting up and requesting the topic, which is given in the moderate, which it which it is publishing. If you open up a new or terminal on bond, try toe Ross topic list even though see a change. And as you can see that you can you have other than the standard Ross Cory of the chatter topic, because that is what that is, what is getting exposed now. If you go to the home help directory for this court, you can see the critics coming up from your artery. No, by doing a roast topic equal chatter. So let's do this. So let's go on the terminal and we're all stop it. He called chatter on, and you can see that the date itis receiving is hello world. So we completed a this assignment on this interesting project in which we not only connected on Adriana with Ross, but We've also used it as a publisher off a hello world message. We're topic and we are equal That topic from from our laptop. And this is the first step towards interfacing Ross. With Adriano there is another tutorial which is the opposite in which will be using the Audrina was a subscriber Onda, we be looking a total in the next video. Thanks for watching. I'll catch up with you in the next video. 12. Lab: Arduino as Subscriber of LED Toggle with ROS: welcome once again. And in this tutorial we'll see how we can use the dart Reno a subscriber way were also message. And we'll follow the same fight on the serial which we used in the previous tutorial. What we published our Torino published a hello world message Onda. We will listen to it with, um with the with the equal that particular topic now this court is also well documented and within the standard library. So all you have to do is go to file some example raw slip The schooler don't for you. And here you would have the blink so you can click on the blink on You will get the court so you can just upload the court by clicking here. And in case you have authorization issue, you can go ch more than a plus r w. And it is done uploading. Okay, so in case you're getting in headed here, and just watch the previous video in which we change authorization off the port. Okay, Now we can go toe go and open the raw score for me. It is already running and you can you can open up a new terminal and just like the previous example, you can give Ross front followed by the package name and followed by the fight on the implementation off the server, which is cereal and the school, nor by and followed by the port name. Okay. And if you do, you would see that on the it will subscribe and connect toe the serial port off the Adriano . Now inside, inside another new terminal, just like the previous example you can do with Ross Topic list. And you would see that there is a new topic which is a total underscore led, which is there. So this is what we need to subscribe toe and send a message to send a message to this particular topic. With struggle underscored already, way used this command and we send it only once with an empty, empty message. But what it will do that it will be in the state of the default being 13 off the yard. Reno, you know, So if the video was off by foot, when you run it first time, it will be off, it will go on. And if you do it again, it will don't go off, and it will keep on are struggling, so let's try it. So I run it once. And as you can see that day led goes on. And if I do it again, led goes off. So here, dark green, a woman who is actually subscribing told our topic and acting on the empty message, which is sent and which is also reflected in the court. That documentation again as usual as I said, is given in this languages the example of subscriber under due to real for blink. So have a look at it. And if you have any questions, feel free to marks me in the Cuban a section. So I hope this was helpful, at least to get the basics running and getting connected with Ross and our Drina, and I'll catch up with you in the next video. 13. Servo with Arduino - Plan of action: will come to the section and project on interrogating Grosso on Arduino along with servo. So in this section will use Ross and Arduino to control a servo. And it could be the normal ese 97. What a better one. Which is the metal gear? One service. So anything will work as long as you were in confrontation is correct. Now, just to give you a background on off servo, in case you do not have a prior understanding off service? No, sir. Servos are used for angular movements, okay? And it is used in robotics, mostly for joints. Okay, now, how it works is that it works on the concept off pulse, width, modulation and pulse. So in simple language, it means that when a servo gets impulse upto one So it is, um, at the neutral position, okay. And as as far as it gets a 1.5 millisecond parts, which is this one. It moves the angle from 0 to 90 degree, as you can see, the left positioning off the survey zero degree look at their here and it moves up, which is 90 degree how it moves. If you increase the pulse rate and pulse toe 1.5 millisecond that we come here. And similarly, if you increase the pulse toe to milliseconds, it will come to your extreme right so it can move from zero degrees to 1 80 degree and hence it can give you angular movements for your reports so it can be used to a similar arms. It can be also used example in very basic off secular Worden through board, you can attach an ultrasonic sensor were servo and it can look a left and right, just like a neck off a human being to look for obstacles. Okay, you can goto this link to read more about this concept. Now, in terms off from the Pain congregation, you will have three works in a server. Jin. Really? Now I'll be using a C 97 which which is a very low and low Costas, or when, very easily every level around the world. Okay, so here in that 18 97 the orange where is for for the signal So it should be connected. Are to your Arduino signal, OK, and the brown is the negative and the red is positive. Okay, Now the Rada would be connected to your visa. C five world. Okay, The ground would be connected to the negative of the artery. No, on the for the pulse. Waiter. More delusion will use or injury. And here again as everything. That each pulse is like one or two millisecond, which is the duty cycle on bond. You can see that the water is given. It is a five volt for the server. Okay, now, this is our pain connection. I drew this dragon with open source software colors freezing. So if you want to learn about friends, Zynga goto the bonus section off the scores and you'll find help guide on Fred's Inc So it's very handy. So here is your survival and the signal. The signal is connected. A digital nine on the positive for to be 65 on a negative toe, the ground. So in our court, which will see in the next start to to really we have attested toe been nine. So make sure you attach your signal toe the pain. Nine. When you do the hands on No, for this court's Okay, so I hope it was helpful on in the next video we'll see a concrete implementation off this concept along with it. So I'll catch up with you in the next video 14. Lab: Arduino with ROS Serial and Servo control: we'll come back and I will look at the Concord. Create implementation off the server with rose and artery. No. Fortunately, this is a standard court and comes with the roast live library and finally, Mr Broken rules. So all you have to do is open your Adriano Goto file, go to examples and you have to go to the Rose Lib library as we did for the previous sections. So I just scroll down on show you on the program. So you have to come to row slip and here you can see that there is a program for the service which is called a servo control. So click on it on. Do you need to our deploy as it did in the previous videos for our Reno and give the authorization port. So I'll not repeat myself. But in case you are jumping directly into this section, I also request you to goto the previous section and see that How do we deploy Ross Hadron accords and how toe give the tradition? So I've already deployed my court. Okay, the next thing you need to do is obviously run your raw score, Onda, after you've run your Ross Korea. You need toe open up a terminal and then you call. You have to call the server implementation off off rice cereal. So it's the same thing, which is the roast run Ross Ross cereal underscore fightin and then the pipe and implementation of the server, which is Cereal Lord and followed by the U. S. B port name, which is applicable for you. So this is already running for me on then. Now what you have to do is that you need toe unit toe subscriber. So the topic, which means you have to give raw stop. You can publish the standard message off interior 16 followed by the degree. So if you give 98 with the survival turned by 90 and if you give one itty, the server will are down by one itty so I'll just do it and you can see the servo movement . And if I change the degree also, you can see the server movement. So this works. This court works quite need, and I will also running through the court. Okay, so the first section officer is the standard, our declaration, or depending on the Arduino board followed by importing off the header fights for Salvador H. Now, if you walked with her, Martina, you know that sort of about 80 of the standard salvo header file used in our journal for controlling servos and obviously the standard rose or 80 and sturdy messages off type 16 Heather we import. Then you create a object off the type north handler with in each and defining object off the servo class I serve wears well. Then we write a custom function, which is sort of underscore on CB, which you can see here and here. You take the parameters off the standard, the messages as import because those are going to come from the user which you give like 1980 80 degree 180 degrees. And then you right there toe toe the servo Mrs Data with angle from 0 to 1. Itty. There is also a a quarter for digital writer which will which will toggle the lady and then you have a set of function in which you are doing the set up off being 13 for the led toga and then also you are doing in sensation off the note with the NH object and the subscribed which which we did earlier and do it as the servant with a pin nine. So make sure that you have attached the serval the signal of ah, signal point toe Digital pin nine. Okay. And then obviously here we have a function call or to the topic servo. And also the function called which is happening here, which is terrible underscore CV, and we're already defined this function. So, um so this will this will walk in infinite love and it will keep on listening. Our messages would just send a tow. This topic, and depending on the angle which you give the servo will move its position. So I would request you all of you toe have a look at it. This is really easy to do on any problems. Just asks me in the Q and a section. Hope this was helpful. I'll catch up with you all in the next video