Learn Robot Operating System: Basics | Suryaprakash Shanmugam | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Learn Robot Operating System: Basics

teacher avatar Suryaprakash Shanmugam, Crunching Coffee to Code

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

15 Lessons (1h)
    • 1. ROS Pilot

    • 2. ROS Introduction

    • 3. ROS VirtualBox Installation

    • 4. 3 ROS Installation

    • 5. 4 ROS Packages

    • 6. 5 ROS Buildsystem

    • 7. 6 ROS Computation Graph

    • 8. ROS Nodes

    • 9. 8 ROS Topics

    • 10. ROS Publisher

    • 11. ROS Subscriber

    • 12. ROS Services

    • 13. ROS Msg Srv

    • 14. ROS Service Client Code

    • 15. ROS Bags

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

ROS is a robotic middleware which offers a collection of packages for commonly used functionality, low level control, hardware abstraction and message passing. 

ROS is all you need to transition from a hobbyist to a professional developer in the robotics domain! ROS is currently being used by hundreds of universities and tech start-ups around the world. 

ROS powers a huge number of wheeled mobile robots, manipulators, aerial vehicles and much more! Basically, any kind of robot can be integrated to run with ROS. Research & Development is not the only place where ROS plays a major role. In real products, ROS has been successfully deployed in hundreds of robots. The current list of companies using ROS includes major players like Segway, ABB, Clearpath Robotics etc. and is growing every day!

This course covers the basics of ROS. It introduces you to the world of professional robotics programming! You will learn the tools and services that the ROS ecosystem offers in a structured and power-packed manner. If you master the content presented in this course, there is nothing to stop you from learning to program and use ANY robot that runs the ROS core libraries. It can be integrated with popular computer vision libraries like OpenCV and Deep Learning frameworks like Tensorflow, Caffe, perception library like PCL and motion planning library like MoveIt!

What this course doesn't cover:

  • Robotics concepts
  • Algorithms for planning, perception etc. We won't dive deeply into what kind of algorithms are implemented in each of the ros libraries
  • Robotics hardware

The basics of ROS is already presented in the course. You can expect new content to be added regularly! This will include

  • GUI tools
  • URDF, TF
  • Using pose estimation, localization and navigation libraries
  • Model a robot using a 3D design software and export it for usage in ROS
  • Simulation of a robot model in a real physics environment using Gazebo, vrep etc
  • Visualize a robot's states like velocity, position, sensory information using rviz

Meet Your Teacher

Teacher Profile Image

Suryaprakash Shanmugam

Crunching Coffee to Code


I am a Robotics and Automation graduate from PSG College of Technology, India

I have experience programming mobile robots and industrial manipulators using ROS

I am on Skillshare with the intention to share my knowledge in the fields of CS and Robotics. Currently I am working in the fields of Supervised and Deep Reinforcement Learning.

Interested in computers, competitive programming, business and investing

See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. ROS Pilot: robotics and artificial intelligence are the two hottest topics that we hear everyone in their cada mia and industry talk about these days. Robotics used to be a specialized field that was found one in manufacturing as these big, old fashioned, clunky machines that were used for mass production. Robotics has proven to be pervasive in our everyday lives, with breaking the industry notion that robots are when he suited for task that are dirty, dull and dangerous. Nowadays, robots work closely with humans, as opposed to lights out factory floors by helping and the collaborating with them to achieve complex and repetitive tasks. With the proliferation of artificial intelligence and machine learning, robotics has found its boost in the recent years. A common well known example is self driving. Cars were $1,000,000,000 companies like Google and Uber are pouring their time. Money on resource is to make driverless cars a reality. Multiple robotic tech startups have raised millions of dollars to tackle technical challenges in building their products. Robotics is a multi disciplinary feel that as a touch of mechanics, electron ICS and computer signs, the hardware needed to build robots have been around for quite a while, now. But what about software? It is not that easy to write self. Therefore, robot, even for one that performs a humanely menial tasks such as fetching a cup of coffee robot operating system are Ross. It's a common platform for those who are building and using robots. It is widely used by students, developers and industry professionals across the world. Ross is for those who want to focus on the actual robotic spot that is, the algorithms that enable us to perform advanced robotics tasks like a navigation planning in localisation it. Let's you focus on your intended application rather than having to deal with the gritty details of hardware like driver software are registered level programming. People enter the field of robotics with dreams of building their own Wally robots and are towed Ito's. Should they wait around for a couple of years writing their own piece of software to even see their robots move, Whether you are a student, are an enthusiast? Was looking to build a robot of any kind, and if you want to see three year project till it's sexist by making use of the open source of robotics framework, Ross to get your robot to do cool things than this course is for you 2. ROS Introduction: My name is so Rhea Prakash and I will be your instructor for this course. In this introductory video, I'll give you a brief overview on what Ross is all about. Some like to call Ross a robot application development platform. According to Ross, Vickie Ross is an open source meta operating system for your robot. Before I explain why Ross gets the tag matter operating system, let us briefly discuss the role of an operating system in general. In a computer, the resource is available to a program. Are the CPU memory disk space and I were devices when many processes are running on the same computer, all these resources need to be allocated according to a program's requirements and the state of the other similar programs that demand system resource is this is known as shuttling and is done by the HOSTE operating system running on your hardware. Another important reason why we need operating systems that they provide a convenient way of accessing the hardware. Ito's is too sophisticated software without having to know the gritty details of hardware. This is known as hot over abstraction. Ross is not an operating system in this traditional sense of shuttling and process management. Ross is a meta operating system because it sits on top of the heart stop writing system, which is open toe and facilitates a structured communications layer between abstracted processes running on a computing cluster. It does in a they provide hardware, abstraction and low level control and, most importantly, message passing between the devices in its network. Another reason why Ross's amid operating system is that it makes use of a hostile ways this process management system, fire system, user into face and other programming tools. The primary goal of Ross is called Reuse and Robotics. Research and Development Language. Independence is and other powerful feature of for US brass supports bite on c++ less and a couple of other languages. Unofficially, Araz distribution is released every year with added features on every release, so that developers could build on top of that and other uses could get benefited from the upgrade. Since Ross is open source, it is free to use on. On top of that, anyone can contribute to which development. My primary motive in the scores is to make you comfortable with the basic tools that Ross provides. Unlike other courses, which jumped directly into teaching you hobby robotics with a single board computer. I built on the fundamentals of robotics framework, which will enable you to write professional quality software for any robotic application off your need. I'm fairly confident that at the end of the scores, with a little bit of practice, you will have mastered the basics off bras ecosystem, which is the hardest part, after which you will be able to make use of the plethora off tools and applications that the Ross community has to offer. 3. ROS VirtualBox Installation: Hello. In this video, you will learn how to install the Lennox based open toe operating system and run it on top off your windows. Always if you already have open toe installed and virtual box or as a separate OS with door boot. This shouldn't be a problem for you, and you can skip the story. Oh, even the Ross can be made to run on other Lennox based operating systems. It works best with open to based operating systems like Open do Que Open Toe except 12 and L Open, too. Because many of the core Ross functionalities depend on the packages hosted by open to distribution. Ross is built with backwards compatibility, which means that any Ross destroys, supported by a previous version of the open toe, always continue to be supported in the upcoming open diversions. Also, for example, Russ Indigo in Clovis, supported by all versions, everyone to foreign, final for trustee and a bow the rivers is not true. Higher versions of bras are not supported by local based open toe operating systems. For example, Russ Kinetic came is only supported by open to 15 find on Oh, never the battery packages of Ross Kinetic are not available for open to 14 Final for trusting You can build from sources to get around this issue, but as a rule of thumb, it is beneficial to use the officially supported healthiest version off the open to us in our clothes, we will be using Raskin it again with open to 16 final For LDS, otherwise called denial, Marshall Box is an application that lets you run another operating system on top off your current OS. This is particularly useful when you don't intend to replace a shower your current, always with another for temporary usage. Now let's see how we can install watch box on your Windows mission. The installation process of Virtual Box is pretty straightforward. Not it's a download. Virtual Box will visit the official article V in Virtual Box Downloads Page as you are a Windows user. Please go ahead, download and install the Windows application on your machine. It is also available for Always X and linens, but we don't care about it right now. I skipped virtual box insulation because I already have it installed on my mission not to create a new, urgent mission. Click on the new Aiken, go ahead and name your OS. Whatever you want it to be. I'm going with Russ. You want to change the type of your overseas to clinics, you can see how the version of the next gets automatically. Jacinto 64 Bit open toe. Since that's what we want, we leave it as it this. Now it's time to download our open door. Always unlike Windows, going to this free download and use it comes is an IRS of fine, which we can use to mount and install on a computer. In our case, it happens to be our virtual computer. Since the order to decided to use Windows in, I'll go ahead with the download. If you can afford to contribute to over the development, you can choose to donate. You converse with download. Make sure you have it saves a more on your disk, coming back to about your mission. Set up going next, you'll be asked to allocate Ran for your over to always. Since I always would need a considerable amount of ram, I am choosing to share a little about half the room with the gland. Always at this stage, you are prompted to choose whether you want the green virtual hard disk. We certainly want to create about your hard disk, and we'll choose its actual size in the upcoming set up. We'll go with virtual box disk image, but people find a dynamically allocated disk file will occupy space only as and when you populated, so we choose that this is by you can enter the size of your virtual hard disk. I'm going with 30 TV before the Buddha are always. We must first choose the IRS of files that we don't lord it for the moment. Image. To do that, click on Settings Icon, Select Storage, Click on the City icon and Controller. And as I have included the eyes of before, it shows up for me. If it doesn't show up for you, you might have it. Shows it from disk. No, we can boot up. Once overdue. Boots up, click on install aboard. Do if you can continue at this stage, no matter what options you were given, choose a race disk and install Ogando. Since we're inside the virtual box, you can't damage your host OAS in any way. Click on install now choose your times on since I'm in India, I'm gonna go with in their time. You can continue. Choose your keyboard layout. Fill in your user name password your computer name that continue on fast forwarding the installation process here. But it should take a significant amount of time for the always to get installed. Once the installation process is complete, you can restart. There you go. You're open toe always is now ready for us. In the next video, we'll see how we can install and set up for us. 4. 3 ROS Installation: Hello. In this video, we will see how we can install and configure Russ in your open toe mission. The installation process of Ross is pretty simple if we follow the instructions provided in the Vicky Page of Ross Kinetic Installation. If you're watching this video immediately after virtual box installation, you probably have to install the latest open. The package is to keep your system up to date. To achieve this, open a new terminal using the key combinations. Control all and T then type the command pseudo a pretty update. Once this is done, upgrade all the packages to their latest binary version with the command pseudo MPD upgrade . Depending on your Internet connection, this process might take a while. I'm fast forwarding the installation process here, but if you're doing this for the first time rate till the entire process is complete, this is not the Ross part of the installation. We're just setting up our open toe system so that we don't deal with any frustration during actual Ross installation. After this, let's open a browser and had to Ross Kinetic installation Wiki to make our machine accept packages from Ross Packages Index. We would have to set up our sources, not a list. Simply copy. Paste the command from Ross Wiki. You can use control shift veto based on a terminal very easily similarly set of your keys by copying the next command update. Your Debian Packages index by running pseudo a pretty update again. We are given with three options for US installation the desktop Full installation downloads and installs raw skeleton libraries, G Y tools, simulators, navigation and planning libraries about from installing the bad bones with the desktop only install. We get rich realization tools on other robot generate libraries. Ross Bass has won Lee the terminal tools needed for setting up just the basic Ross Eco system. You can also choose to install one of the packages that you are interested in. Since we won't be delving into advanced, the simulators are the navigation stock, yet we'll go for the desktop only installation. If you're new to the Lenox operating system, you can muse over the debate. Messages showing during the installation process are you can take a break for a cup of coffee as this will take quite some time to install. There is a couple of post insulation settings that we need to make Before we started, we use Ross fully. Now, the package manager simply pulled executable from the cloud and placed it in the directory on your desk. This is called Byner Installation. Since Ross is open source, you will also be able to compile court locally on your machine. This means that you can modify the robot code and customize it. However you feel fit. Such a compilation is called Source Insulation. If you choose to do source insulation in the future, you will have toe initialize Russ depth to do this, run pseudo Ross step in it and then run Ross DEP Update. One way to ensure that your Russ and Veron Mint is set up properly is tried running the Rust Master node. You can do this by running raw score as you can see the executable. It's not visible to the command line. Now. The download of draws packages are placed inside the directory. Opt Ross Kinetic. You shall find a file called set of dot bash in the root off your installation. You must source this if you want your installation to be visible to your current terminal. But when you try to run the Rust Master in a new terminal, you will get the error again because the part is not visible to your newly opened downer. This will be headache when you are walking on multiple terminals at the same time as you will do in the future. In order to make this permanent open the file called Bash are seen in your home folder And add the line source. Opt Ross Kinetic set of the bash at the end. Now you're in. An entire installation will be sourced every time you open a new terminal. When you run Rask or again, you can see that it runs without any complaint. Congratulations. You have successfully installed Russ. 5. 4 ROS Packages: In this tutorial, I will demonstrate how to create a Ross package inside a cat can work space and how to work with Ross packages. In general, all Ross packages must be placed in a cat can work space while working in the Ross ecosystem. This makes the back age identifiable enables easier. Compile ation on. Bring structure to the court that you write. You might find this painful in the beginning, but once you master this, you can concentrate on the algorithmic part of your robotics code than spending more time on the rest. Now open up a new terminal and create a folder with the name off your child. This will be the name off your workspace inside your workspace. Great. A folder called SRC, Otherwise called a source. This is where your Ross packages would recite before we start creating an empty Ross package. We need to initialize our current directory as a workspace. To do that, use the command Kotkin, Innit? Workspace while being inside the source folder. After this, when you list out the contents of the directory, you will see that a new file called Seem it lists that txt was created. This means that are empty. Workspace is ready to go through its first compile ation. To compile your workspace, navigate to the root off your workspace and use the command cat can make. To start the bill process, you will see a bunch of compiling a debug messages on your screen, but you don't need to worry about that. Once the workspace was successfully built, you will find two new folders called Build and Devil in the Root Off your workspace. Please feel free to explore the contents of these directories, but keep in mind that we won't be modifying anything in these directories, essentially at the lower level. Ross packages are cat can packages, which means that they should follow a particular directory structure and contain a couple of files that identify them as a Ross package and help build the court in the packages. Now let's create a new Ross package with the command cat can create package, followed by the name off the package on the Ross package. We want our new package to depend on Ross by indicates that you will be writing a bunch of python code Ross CPP, a bunch of C plus plus code and standard messages to indicate that you will be using standard message types like int eight in 64 string or maybe even a float. Hurry. The script cat can create package will create a skeleton Russ package for you. They're saving you the effort of having to follow the directory structure. You will find a new package called Robot Tutorials inside your source folder and a bunch of files inside your package. You can find a C make lists that txt inside of your Ross back. It's also this contains information about how to build your Russ package package. Wrexham milk contains a meta information about your package. We'll get back to that later. Not a bill your workspace with a new package inside, go to the root of your workspace Again a news cat can make to start the build process. You can see that your package was identified your income violation. Let's clear our terminal and change to the home folder. There are a few command lane you'd lady functions that help us navigate their own. The Ross file system Ross back find is one such command that will help return the location off your Russ back. It it did not work now because your workspace is not visible to the file system to make it visible. Navigator, your workspace directory and source. The file called Set Up that Bash, which is inside your Devil folder No. One. We dry again. We get the expected result. Sometimes it might be difficult to enter the full part in which your package recites. In that case, you can use raw CD followed by the name of your package to directly enter your baggage to list the contents of a Ross package from anywhere Ross Ellis can be used. Log over. Ross Process is stored in the Hidden directory. Jumped over directly. We can use Ross CD law. Let's explore the contents of a Ross package. Packaged XML is a file that holds meta information about your package. It is recommended that you constantly update this file with respect to any changes during the development of your Ross package, even if you don't it look perfectly fine in your machine. But when you release it to the Ross community, it will not work properly if there is any missing dependencies in your package or XML file . As the extension off the vile suggests it uses XML tax to specify relevant information about your package. Vomit do is the newest recommended foam it. Starting from kinetic. We can change the version to reflect the current release. If your package is too complex, you should maintain a detailed description body so that the uses can infer from it at least why this particular package exists. The license tag is important where you can specify one of the listed open source licenses. You can also add an author email attack if you're willing to let the community know how to contact you in case of any issues or help with yourself. Fair build a depend specifies which packages are needed to build your package. Build. Export depend is needed when you're libraries need to be built against other packages. Execution depend specifies the packages that you need at run time. No, after all the cleanup, the package direct. Some of file contains a specific set of tax, which mention the dependencies on other meta information about your package. Now that is it about Ross packages. As with all topics, expert ties comes one Lee when you practice, so make sure you practice the concept start in this video before moving on to the next. To summarize. In this video, we saw how to create a cat can work space and how to create a Godkin compatible Ross package, the command line tools that help us navigate through the Ross ecosystem and the importance and competence off a package manifest file. 6. 5 ROS Buildsystem: in this video, you see how Ross's cat can build system facilitates easy, calm, violation of the robotics code that be right. But before that, it becomes important to understand why such a bill system exists in the first place. If you understand this, you'll never question a complain about grasses, seemingly complex bell system and learn to make the most out of it. I'm a big fan of the Wally moving. Let's assume that we are building a wall of robot on. We want to make it say hello, the Eva. We also assume that the task is done. If you print Hello, Eva to the standard output. We can do this with a simple print statement. Now the source code needs to be compiled to produce a run a ball Executable Files G Plus plus is the C plus plus compiler for linen after G Plus plus compilers a program. We can run it by pre fixing it with the dot and the slash Simple and easy right. But there is no structure to the build process at this point. As the court you write becomes complex, the compiler might need a lot of input. Arguments to compile your code. Sometimes when you have multiple files into the compile each file, generate object files and link them all together. When you roll out your software, the end user almost never wants to performs its complicated step toe a wide that you can bundle your project with the make file. You can imagine the make file as a cooking recipe for compiling the court in the project. We can write targets for this to cook a variety of things, for example, that can be a target to clean up the executable generated. One drawback off this is that it'll work on Lee Ann Lennox machines. To overcome this weaken, go for C. Make our cross platform make see make Recognizes, which combine it's to use for a given kind of source code. Simic makes reasonable Defour choices based on your system configuration. The difference between make and see make is that Simic has an additional step where you have a set up your building environment. This generates a make final in turn. If it's a the next mission, then you use make to combine your project, even though the end result is the same in all these processes, the end goal for having the bill system is to reduce the headache off people using your software. Remember when we used that can make to build a Ross package in the last video? It's actually exciting to know that Cat can uses seeming at its back to run its builds. Now that we have that information, let's give it a shot at building a Russ package with C make, we'll go to our workspace and create a folder called Build. As you might have noticed before. This is where Simic places files during compile ation See Make requires the directory where a Simic lists dot txt file is placed as its argument to set up its build environment. Let's see what happens when we give our source folder as its argument, since it contains the same make lists. Doc. Txt for the workspace. When we run make now we expect that the workspace to be built as it should. But as you can see, if we missed the Devil folder that we get from a typical cat can make build, the reason is that we should have specified explicitly that we want that to happen when you're on C. Make after we said the command line Arguments see make installed. Perfect and cat kin Developer fix on grand See, make and make again. We see that the Devil folder gets created. This is exactly what is happening in the background when you run, Cat can make the bill command to compile code inside Ross packages that exist within a Ross workspace. At this time we put some code inside our Russ back age and compile it with Kotkin. I'm copping the hollow even at CPP program that I wrote earlier to the source folder inside a robot tutorials package. There is one crucial step before we start compiling their hollow Eva program. Remember when we included the hello Everett CPP file while building it with scenic? We're going to do that exactly again. But this time added to the Simic list a txt file inside our package. Don't be alarmed at the volume off the Simic list file. At this point, Ross simply generates the file with most of the lines commanded out so that we will find reference to commonly use statements in the file itself. Search for the line starting with add executable on modify it so that the Wally Hello node indicates the name off your executable, followed by the part where you placed your CPP file. Once Dad is done, go to the root of your workspace a news cat can make to build the volley. Hello, node. As you can see, we get sophisticated debug messages about the notes that are getting built. Drink a violation. We can find the generated executable inside Devil live robot tutorials. We can run it from there directly, but it would be cumbersome to navigate to this directory every time you have to run the Ross note. After sourcing the set up that bash file in your Devil folder, you can run it directly from anywhere using rats Run, followed by the name off the package and the node name. Now that is it. Would Ross Bill system please go ahead and practice the concept. Start in this video to summarize in this video we saw the importance off a build system the conventional build options available for C plus plus code and how to related to the Captain Bill system. And we wrote a simple example program stage it for Bill using seem eight lists and then use the cat can make to build the same 7. 6 ROS Computation Graph: before we advance to write in code with Ross AP Eyes. Let's get a sense of the big picture and understand how Ross works as a framework by briefly discussing its computational graph level. The building blocks of Ross is entailed by its computational graph, which contains notes, Master Barometer, server messages, topics, services and bags. Notes are individual independent computational units that perform some kind of competition looking at it from the perspective off robotics engineer who was looking to build applications through Ross, we can imagine notes as stand alone programs that are responsible for discreet tasks. Taking the example off a quadcopter. Given that we're running Ross on it and node can be responsible for, say, controlling the rotors off a quadcopter, another node can be on the ground communicating with the court copter, giving it target positional commands through a handheld controller. And I am You note can be solely responsible for the court copters, acceleration gyroscopic and the magnetar meters sensors, which can help it localize itself in three space. Another node, for example, can take care off camera facing the ground. One more note can communicate with our camera to provided information about objects detected on the ground since it is costly to equip our bought with a GPU, which is typically required to perform complex linear algebra calculations for object detection, we can write our notes such that the boat communicates with a station set up on the ground which performs object detection for the robot. On relates the information that the Bard is looking for. Such a programming paradigm gives Ross the advantage off it being a distributed computing framework. Although roses and distributed there has to be some kind of a record book that keeps track off all the notes and services that are currently in the Ross Computational graph, the Ross Master provides a look up table service for the competence currently registered in the competition graph. Taking our Quadcopter example, we can see the status off each of our notes by making use of the tool to that the Ross Master provides. The parameter server is like a fire house of Constance that any notes are services in the graph can make use of the values of the constants can also be changed during runtime. Let's imagine that we have implemented a proportional, integral derivative controller in our Quadcopter to manipulate its projectile when approaching a target location. For this, the P 80 constance can be put upon the parameter server that the motor controller note can make use of during its operation. Even though the notes in the system can perform its operations independently, it becomes crucial for them to communicate with each other for a number of tasks. For instance, the RPM sends two. By the end, quarters in our rotor can be fed back to the control unit for real time control. When such a communication happens, the notes have to communicate to each other in some fix it. Farmer Ross messages are nothing but data structures that facilitates this kind of an understanding between the notes. Message types can be a simple string. A boolean value are accustom, see structure, depending on the application of the hand. For the in quarter example, the note can send out its messages about the rotations off the road are as a simple little bit integer value. Although multiple notes work in khan currency to achieve a particular task at a higher level, the architectures built in such a way that one note is not truly aware off the other notes , then how did the doctor each other? The information that is sent out by a note comes with a label in context attached to it that we call a topic and note. Looking for information is aware off this topic. Name on it can simply listen to its data stream. Data sent out by a note can be accessed by multiple notes, given they know it's topic beforehand at any point of time. Many notes can publish on the same topic in the graph. We'll look at topics and videos in the upcoming videos. In our Quadcopter example, the encoder node and the motor controller note can be communicating with each other under the topics. RPM Broder's X, where X can indicate the rpm off the end to wrote her since acquired Copperas for Roeder's Russ Services. Handled request response through remote procedure calls communications in publisher subscriber. It's uni directional that is a no does not get a response to the message is it publishes. This means that it need not wait for a response from its receiver, but in the case of services, the communication ists bi directional, taking an example scenario, a service request can be sent by a Quadcopter toe, a coffee maker, to start its preparation, which is located on the ground. The coffee maker can be made to respond to the Quadcopter once the preparation is complete , after which the robot can proceeded to pick it up and serve a customer. Ross bags exist for one sole purpose. To store and retrieve messages. It can be raw, since our data are the actions taken by the motion planner when it overcome an obstacle. This information can be used to optimize our perception. Are control algorithms offline? Since all communication and Ross happens through names, it is also possible to reconfigure and no during runtime. This means that begins, which are for a coffee mission or during operation. And this won't have an effect on the working off the whole system. We can reprogram it to make D this time under Quad wouldn't mind it. This is something that would have been difficult to accomplish if there wasn't a distributed framework like Ross. Now that's it. Aboard Russia's competition graft level, the following videos will have content and what each of these competence explained in this video with which you can build your own robot toe, have highly modular reconfigurable and distributed software with a mind of its own. 8. ROS Nodes: Hello. In this video, we look at Ross notes with an example. In a constrained the Tories simulation note called The Terrorism. Ross not only have a limited number of commands on the terminal on its list of features, is small and can be exhaustively learned very quickly. Let's open a new terminal and run the Ross Master with the command raw. Score the list of the notes that are currently active and running. We can use Ross noted List Ross Notice just another executable like Ross score, which was downloaded during installation and placed in the folder. Been off the installation directory. Weaken. Bring up Paterson as a Ross mode with the command Ross Run Terrorism Terrorism. Note. This will open Aggie. Why, with the total at its center. This is the AARP it Tory Kardashian robot that we're going to play with on asking to perform a certain range of actions. If we use Ross noted list again, they can see the presence off our new North terrorism. That completion is one of the useful features in Lennix, that'll especially helpless. It's uncertain moments he can type Russ Note and hit Tab twice to look at the list of commands that can follow it to fetch in for about a node. Ross. No info can be used. You can see that our monster nor disassociated with a set off publications, subscriptions and services notice how there's a connection to terrorism. We can use the same to fetch in four, but the turtles in note Ross not think can be used to check if a notice alive at any point of time. No names can be changed with a command line argument through Ross Run Notice how the name of the note has changed. Cattle seem needs to be closed through its Jew y illegally close it through the terminal with control. See in the middle of its operation. The note might not properly de register itself from the graph, since we can't communicate with a non existent, nor we can't family kill it either. For this purpose, they can use Ross not clean up to get rid off any obsolete notes in the graph. Also, Ross notes can't be listed when the master node is not running, even though he only took a look at the data. Lsim Norden brief. It has own code with Ross library calls of written on reciting the Ross Installation Directory will actually look at how to register and Norden Ross when we write code for a publisher in a later video. 9. 8 ROS Topics: hello. In this video, we're going to dive into detail about one of the most important concepts in gross topics. Topics stand at the crux of understanding Ross in its entirety as a showcase Ross as a communication platform, which is a star requirement in any robotics framework. Let's open a new terminal and start our master node. Bring up the Donaldson note has to be discussed in our previous tutorial on Ross notes. There is another node under the terrorism package called The Data Tell Ya Qi, through which we can control our turtle through the arrow keys. They can drown it using Ross Run with Ross Sarin turtle seem total tally up key, please note again that tells him. Here refers to the name off the package on tattletale. Yup, key is the node. Go ahead and move your robot. Using the arrow keys, make sure that the terminal running the turtle telly up Keynote is focused while doing so similar to Ross. Note. There is a command called Ross Topic, with which we can fetch in four and control aspects of Ross topics. To list the available commands under Ross Topic, use Ross Topic, Dash Hedge, Ross topic list can be used to list the topics that are currently available in the graph. Not that the topics command velocity, color sins are and posts are perfect with its node name, which are sometimes useful in differentiating between notes if they're publishing messages under the same topic. Ross Topic Echo is used to print the messages that are currently published under a topic at any point of time. When we echo the command velocity topic, nothing gets printed at first because nothing is getting published in the first place on our bodies, not in motion. When we go to the terminal running the no total daily up key, they can see the velocity. Information in the linear and angular axes is grating. Getting printed. We can use the verbal stack to see details about a topic in detail. Use Ross Topic Type, followed by the name off the topic to see its message type. The linear and angular velocity information that we saw before actually belongs under a message that called geometry messages twist. This is a message type that exists in the package geometry messages. Similarly, the topic color sensor has a custom message type Datil Sim color, which was written during the development off the package. Troublesome to get information about the former off a message type Use Ross message show, followed by the name off the message. Here we see that geometry messages is made up off two vectors of floats 60 force, which represent linear and angular velocities along each axis. As the number of notes and topics increase in the graph, it becomes hard to keep track of everything. To make things easier. There's an elegant GeoEye visualization toe called Arcuri graph, with which we can watch notes and topics in action. We can see that the notes tell you up total and tells him, are represented as rectangles on the topic command velocity through which they're communicating between them. When we run Ross not list again, we can see that a new note for archaeology why has registered in the graph this implies is arguably graph is also reading information about the notes from the Ross Master. We confined information about a particular Ross stop using the command Ross Topic info, followed by the topics name. Notice how the total Terry UPC in Norway only publishes messages off type geometry messages twist under the topic Command velocity weaken. Do exactly the same through the terminal on make our turtle move with the use of an external node. To do this, run Ross Topic Pub, Dash one, which means that you wanna publish once and exit, followed by the message type on the actual message here it happens to be vectors of linear and angular velocities. Let's ensure that this is happening properly with any mistakes. By using Ross Topic Echo to publish the same message. Repeatedly array of one message per second we can use the option dash are followed by its frequency. When we bring up Arcuri graf again, we can see that a new publisher to the topic, Common Velocities Register, which is the one that is repeatedly publishing the largest. The messages notice how it got a random name assigned to it. Similarly, and new subscribers also registered with a random name. Apart from our terrorism mood here, this is actually a Ross topic Echo Command that we had running another terminal. When I interrupt execution off the Ross Topic, echo command and refresh the graph again, you can see that it disappears as multiple notes can be publishing to the same topic. Let's try running the tell you up. Keynote again, published velocity messages and see what happens. Notice how the turtle moves away from its circular part and trails off in a random direction. This is because two off the notes are publishing velocity commands. This is a valid scenario in robotics, where you want to assume control of your robot through a handheld controller. If, say, a human finds the robot about a collide to an object, we can print the frequency at which a topic is being published with the command. Ross Topic Hatches E This is much alike finding the speed off a broadband connection when the echo the color. Since our topic, we can see that the Bagram color off the G Y window is getting published. The DYP tattle Sim Color simply happens to be a list of unsigned eight bit integer color values when we echoed the topic posts from terrorism. Nor do we see interesting values, the position and angle of the turtle and Tony space, along with the linear and angular velocities at any point of time, please go ahead and practice the command start in this video to somewhere, right? We saw how the Paterson can be used as an example to Lund Ross topic on the various command under Ross. Topics on how to use them in combination with the raw snowed and Ross message, we saw how the graph visualization toe Arcuri graph can help when humorous notes are in the graph. 10. ROS Publisher: message passing and Ross Happened through publishes a crabber interfaces provided by Ross Library functions. For simply sitting in this video, we'll see how to write a publisher in Python. You can look up on how to use the Ross C++ AP eyes from the Ross Wiki Page. Let's head to our Robot Tutorials package and create a new folder called Scripts. Barbie will put all of our fight on fires. The objective of the exercise is to create a known that continually broadcasts a pre defined the message. Fire up your favorite editor and we can start writing our first Russ node to write a Ross note. Import the rust by package in both the string message type from the standard messages package as we're going to publish messages of the type string. The Ross interest exception is used to capture dominate signals thrown when the press control see toe about the execution off a rust node with Ross by that publisher, we declared that are note will be publishing to the topic. Hello, using the message type string and the Q size argument which limits the number of cute messages Ross by that, and it notice where you specify the name off your known here the name are known Wally, enabling the anonymous argument. We ensured that no name clash happens. It basically appends the node name with randomly generated numbers. Ross Spider Rate provides a convenient way of specifying how frequently we want to publish our messages from the node passing an argument off. 10 Beginner know the published 10 times per second Ross by that is shutdown checks. If Control C is pressed, if it is true, it exists in Loop and Are No de registers itself from the graph, let's have a variable called Greeting that holds the string that we want to broadcast. Harassed by that lock in for is used for debugging. It brings are published message on the terminal right into the notes, a log file and to Ross out the published function takes care off the actual broadcasting rate. Dot Sleep makes the script sleep just long enough for the no to publish a message. Once every 100 millisecond that is a 10 hertz. Fire up a new terminal and start the master node with Ross Score. Change the permissions of the file toe. Hello, executing it as a program with ch more plus X, followed by the name off our publisher file. When we run the program, we see the debug messages get printed by Ross spied out logging for with our published message at the rate of 10 messages per second, you can see the effect of anonymous naming when you list the notes. See how the original name is followed by random numbers when we use a raw snowed in four. We observed that the notice publishing messages off type string under the topic name Hello At the same time, we can also echo the messages using the Ross topic Echo from any terminal we can also demographically using Arcuri graph. Initially the notice alone because there are no subscriptions to the topic. Hello, Once we run Ross Topic Echo, we can see that our publisher subscriber on the topic name are color coded. No, let's say that our evil robot only understands messages of type a bit integer Michelle. Add a feature in our volley, known such that it broadcast the same message of type into eight character by character to see the list of available message types understanding messages type Ross message show standing message on hit tab twice, we can see a wide range of message types that we can make use off for a bit. In Teacher, the type name is in eight. Let's add another publisher in the same load, but with the topic name, Hello End and DYP in eight. We'll add some elements to the existing code, such that each character in the greeting string is converted to its equal and asking indigent value. When we list out the topics we see, the integer topic is registered. When we echo it, we see that the asking value off each character getting printed one by one. No, that's it with Ross Publishers. Please go ahead and execute the program on your own for a better understanding. In the next video, you see how to write a subscriber that can listen to the messages published by our Wally Node. 11. ROS Subscriber: continuing on the publisher tutorial. In this video, we'll see how to write our own subscriber code in python, using the Ross by package initialize the subscriber known using and it Not function. The subscriber called, declares that you will be listening to the topic. Hello off type string. The callback string is the function that will be invoked when the message is seen under the topic. Hello, Ross. By that, Spain keeps the note from exiting until note has been shut down. In the callback function, we simply print out the data that is received using raw spice log info. Make the note and executable using CH more classics on, then run the known. When we run our publisher note, we see that the communication is happening properly between the body and even notes. The same can be visualized as a graph with Arcuri graph. Let's add another subscriber for the Halloween topic following a similar procedure, but with just replacing the message type within state from this exercise, we observed that a note can subscribe to multiple topics from the same note. So far, we've been running the Wally and even notes directly from the script folder. What did it be more convenient to make it run from anywhere? Using Ross run for this ad, The Declaration User been environment Python at the top off the publisher and subscriber code. After starting the Ross Monster and sourcing your workspace, you will be able to run the publisher and subscriber notes from anywhere. 12. ROS Services: In this tutorial, we look at a few terminal utility commands for Ross Services and Parameters. Launch Ross Master tells him node and tell Europe keynotes to look at the list of services that are rational has to offer. We can use Ross no info followed by the name of the note of interest. The total sum note hosts a few services for different purposes. If you could recall the previous video on Ross Computational graph Ross Services except inputs as the requests in a pre defined format and respond according to their functional implementation, you can use Ross Service list to view the available services in the graph at any moment. Ross Service that's Hatch can be used to find the usage of various raw service comments to get detail information about a running service used. Ross Service Info. The rest service hosted by the terrorists in note, has a service off type empty, which means that it takes no arguments calling. The service will invoke the functionality it was returned to do and can optionally return a value in this case, the reset service completely Reince Stan Sheets, the two teetotal robot with different athletics every time disk called. Similarly, the clear service erases any trace of the history of the path taken by the robot. The service spawned takes three arguments X y and data, which specified the coordinates and post that the robot should take while creating a new instance of the turtle. When you list the topics in the graph, you can see a new set of topics for our total to robot has been created. Ross barometers Allah, you to store and manipulate did off any format. The list of commands available and the Ross parameters can be seen using Ross Perot. Does Hitch used Ross Barham List to view the parameters currently hosted by the Ross Parameter server, Ross Perot, Um, get can be used to obtain the value that a parameter holds. Ross Perot Um sit allows you to change the value off a parameter. In our case, after changing the values of the parameters for the background color off the canvas, we will have to call the clear Service again for any changes to take effect. Typically, the used the Parameters server to hold Constance, for example, the your idea of format, which is an example. Representation off the robot's joints and links can be put up on the Parameters server, which any notes in the graph can fetch and use. 13. ROS Msg Srv: In this tutorial, we'll see how to create message and service files and build them with cat kin. Message fights hold the fields of Araz Message type service fights. Describe the contents off a service. It has a request feel and a response. Field navigated the Robot Tutorials package. Revival plays all off her message files. Create a file with the extension Dark Message. Here I am creating a sample message type with feeds for the robot's name, country and product. I D. Similarly, create a folder called Service Inside Your Package. Let's say that we have a service which takes to inter jizz as input and returns the maximum among the to for this. The service file shall contain two in teaches in the request and one indigent in the response. The types of these records response fees has to be one that belongs to the standard message types here I'm using in 64 as the type for the fields to build the message and service files for use age. We need to add a few fields in our Simic list dot txt file In the fine package called Add the Dependency Message Generation, search for an an comment. The generate messages tag in the cat can package call at the dependency message. Runtime in the line cat can depends in the ad message. File Skull at the name off your message file similarly in the AT Service Files Field at the name off your services file. Now open your package the XML file and add a new bill. Depend tag for miss a generation. Similarly, at an execution. Depend tack for message runtime the at this so that we need massive generation during bill time on message runtime During runtime, move to your workspace directory and run cat can make install to build and install code for use in all supported languages. Toe. Ensure proper installation. We can use Ross Message show, followed by the name off the package and the message type to list the contents off the message file. Similarly, we can use Ross Service Show the check installation for service files. That's it about message and service files. You can experiment with message files with the former off your own and can even include them in your own publisher. Our subscriber cold. We'll see the usage of service fives in the upcoming videos 14. ROS Service Client Code: in this tutorial will write code in biting for a Ross service that accepts two integers 100 the maximum off the two. We will also write a client code that will be able to send and receive requests and responses to the max to in server In the former. Specify dinner service file, navigate to your robot Tutorials package and create a file called Max to answer that P Y. This will contain the server part of the code the user been in Beit on Header is added so that the Ross run will be able to know that this fight should be invoked with the python executable. The line from robot tutorials dot sir Import star includes all service file in the package robot tutorials. In our case, we only have one service max to ends that will be imported. We registered the note in the graph with Ross by that innit Node Ross by that service takes three arguments The name of the service, the type of the service on the callback function. Ross, by that spin keeps your code from exiting. Until the service is shut down in the callback function itself, we will simply return the max off the two in teachers Using the max function, the callback function takes by default an argument offside max two INS request on Britain's value off type max to interes Pont's in the client code. Max Owens claimed that B y we will create a usage function to let the user know off the proper usage of the client function will receive two values from the input and passed them along to decline function. The wait for service function blocks further execution of the function until a service under the name Max to insist available. If everything goes well, the Ross by that service proxy function creates a handle for a request, and we can call it with the two in teachers as its arguments. The written value is the Max two wins response object, which we proceed to print in the console. If the called fails, a service exception is thrown, which we should appropriately catch with an except block. It is time to testify. Code works properly. Open up a new terminal and start the roast master Navigate to your workspace source. Settled out bash and cat can make it make the service and client files executable by changing their permissions with C H Mart. Plessix no, you can use Ross Rin, followed by the name off the package and the service name to star a silver opening a new terminal. When you use Ross Service list, you can see that our new services registered. Make sure that you have sourced your workspace every time you're in a new terminal. Otherwise, you might face unforeseen problems like this. When you use Ross ofhis info, you can see the type and the arguments the service takes. No. When we run, the client called with two. Indeed, your arguments. We can see that the debate messages for both the service and client A printed properly without any errors. They may also easily call a service with the use off a separate plane code using Ross Service Call. Now, when we collar Max to in service using Ross Service con, we get the expected results 15. ROS Bags: in this video, we'll see how to record data and Ross on how to play it back in a later time to replicate similar behavior. Run the Ross Master Turtles him until Yup. Keynotes in separate terminals. Make a new directory where you would like to put your back files. Use a rush back, Ricard Dashi, to start capturing all data into a back file. Now, play with the turtle bought and move it around for a while before stopping the record service. You can use Ross bag in photo op plan detailed information about the back file. You can see that 12 messages under the topic come and velocity of I recorded. No, the playback are simulated the contents of the back file use rush back play. You can see that our robot moves their own in the same part that was recorded before Ross Backs will be useful to record riel time sensor and actuator information and then use them later in simulation. Our Data Analytics