Programming for Robotics (ROS) Course 1

Welcome to the ROS introduction course my name is Péter Fankhauser we're here with Professor Marco Hutter, Martin Wermelinger and Dominic Jud. We'll guide you through the next five courses through programming for robotics especially with C++. This is the overview of five days in the beginning will start with some of the rough stages throughout architecture in the second tour of course we're going to talk about how you create your own programs in your home Russell and of course three and four are additional tools and elements of frosted to our useful when you work with ROS and on the last day will have one case study from our group in our reviews rather extensively i'm going to show you what we do with drawers and how far we can go when you use the wrong today of course load coming through the part 1 the course one this is important for the overview here now on day one will always have one introductory lecture and 10 introduction to the exercise will have to remainder of the time to solve the exercise and then during this exercise once you're done something more easy for more difficult once you're done you can raise your hands or come up here and show the results important that are each of you shows us the results of such as we can grade it the deadline is always dish the following course early in the morning before the lecture so today we'll have to let the one that size introduction to solve exercise one each exercise has several check questions you see in the bottom and that those are the ones are going to go through when we create we have five exercises each of them count twenty percent we encourage teamwork but all of you have to show the results either on the personal laptop or one of the pcs in the back to us individually like I said exercises are checked by teaching assistants or two latest the following court in the morning which means in the morning 8 15 to 8 45 life at the time where you can come by and show the exercise come early become acute starting the lecture time on time this is except for exercise 5 where you have to show it at the very end of the course because that's a shorter one that's where the course will things let us know once you're done so we can check you gradually so not everybody comes in five minutes before the lecture starts an important for dogs we've already given us shown us that the exercise the lecture the theoretical part will start age 45 so you can show HD into a 45 and for those are shown it come here at a solution but the best if you show it during the morning session for the easy one shared your hand and we can check on you and then you can actually ok so in course one will talk about the rest of the feed the architectures go through the important concepts like to broadcast across notes and topics are you learn how to use your console how to do basic command analogous of what's running on your pc we talked about how you build you know if your system with the captain workspace and then the exercise will be using large files and video simulation what Ross Ross 10 for the robot operating system it's not actually operating system like the ones you have installed Windows Mac presume too much more middleware that lifts between the actual operating system and programs that you write it has four different elements one of the plumbing which means that you have multiple programs running and draws the name of you is programmed to communicate between each other also it provides a bunch of device drivers like to usually communicate with your hard-won second part is there's many basic tools which are importantly when you work with robots being it simulations visualizations are graphical user interface that you can adapt or basic tools like data logging so all these tools were written one you can reuse them to facilitate to work and work with robot with a bunch of capabilities in Ralph's making it for control planning perception mapping tetra many people provided is that consisted of Ross so you can make use of existing tools so if you're an expert in planning you don't have to write your mapping addressing yourself to take some of the shelf and develop your own your specific specific area of expertise lastly rather pick ecosystem the software is organized in packages such as you can easily install and use them and Ross device entire software distribution and there's many many tutorials and you're going to work with telephone online available documentation for this course from many work with the plumbing tools and ecosystem the capabilities those other things are going to die more deeply r during the semester work or other work we go towards the algorithms we provide here to basics for all sorts of tools into the inter process communication look into the history of Ross it was developed 2007-10 for artificial intelligence laboratory and tell you what managed 51 / are taking over in 10 games 2013 now managed by the Hopi tours robotics foundation today Ross is used by many many robots be some of them in the videos his rage from universities are two companies who use this in your system you it's for research essentially they standard test common standard robot programming also there is pushes the industry to use of extensively the Philosopher's rathod that you have many programs on your pc individual one which communicate over defined API is being have Ross messages those messages and services etc and find how my programs community which is out with each other the computer peer communication running on the system that seems peer-to-peer can be distributed a multiple pcs which you have a robot has a computer in your computer to communicate over violence and it doesn't matter in which knows which pcs notes from RCMP API into communications also not only on your pc but also why don't you can build up big interview system with multiple pcs easily with Ross multilingual means you can use any visit existing languages which provides a roth client library will mainly work with PeopleSoft course I'm but such as you know here's exist the library for python that lab in java and this can be mixed matched its lightweight in the sense of loss is not provide all the other than the idea that you take this thing standalone library and wrap them with layers such as you enable existing algorithms to communicate and work with other tools to get on your robot finally runs perfect three and open source so to the very core you can dive in and check for things and to find a partner can our to an issue or actually fixing yourself into extension of rounds so one important element that you'll see is the ross the workplace environment is defined actually the context on where you're working in the rules environment there's this standard when you install it environments which is under if you cutting this command slowed the last version and the environment between importantly you can / ladies environment in your PE we already pre-installed one which we set up the standard folders catkin workspace and by default we whenever you open the console we load on your virtual machine that we provide you the standard workspaces attacking environment with this command you can chest environment armed with this command and you can also see how we set up your pc with this command in the future if you wanna show your own pc but this is already set up this is all only for future reference one important element is Ross master from this managers the communication between your notes so i start up when a note comes up needs to register register with your master master make sure that all the nodes can communicate with each other you can start to control the roster which is simply typing in law score for score has multiple elements which one of which is the roastmaster it Ross knows essentially program from your pc incision single-purpose exceptional program you can compile them individually runs and manage them individually and those are just building blocks of your program these notes are organized and packages or whenever we need a package name it's essentially the name of the package containing there you can have multiple notes you see how here in the example Ross master each individual knows need to register with the masters such as enables communication to run modem you'll use to turn the exercise type in ross run then the package name and the name of your executable once you've done that you can look at the list of all the programs that run by typing in ross node list which lists your other active awesome if you need further information specific information about 12 Ross note because in ross node intro again the name of the nodes and it spits out are all information that's note how to know if you get with children they do it through Ross topics are so OneNote can publish and subscribe to topic and essentially a topic is this stream of messages that are transferred between the notes in this example one note wanted to have registered with Rob mastered the nose one can tell kate i'm a publisher's on these this topic and lost not to subscribe to this topic for the message flown from the publisher to the subscriber interests not to make sure to inform our last connection so the publisher publishes on a topic name which is the name arm under which messages are published and then you can have not only one but multiple notes that strive to this information but typically flows from one known to end problems to look at the list that you have by provided by the notes and run your system you can tighten Ross topic list situation of all the topics you can already in the console you can subscribe to the topic by typing in last topic echo of printing out information and then the topic name will subscribe to stop to control the content on the console if you need information about the topic again like the note-taking rush public info in the topic now I always provide here links are to documentation of raster between trader information just you can download it from our website from the slide type of damage will click on it and he get much more in-depth information on the specific target now on these topics notes publish messages essentially the message find the data structure of information flows from one note to the other it essentially it's from compromised of simple type such as integers floats William bring the tetra also raises these options and the can be nested 21 message can be included in the other one will see an example in second if you have a topic you need to know the type of it can type in Los topic type and tendon odeon where the top and if you need to publish on the topic area future subscriber but you have you don't have the nokia that publishers shapes you can publish them the console with tall with broad topic top publishing then the topic game then you type in the text type and then if you click tap tap is a very important command you auto complete the rest of the structure such as you can replace the argument reason to publish on the topic from your problem so in this example we have published with publishers on the topic to topic inherently coupled with with a message definition here's an example of a message definition which indicates come from the package geometry messages and if the tides point message so this is essentially a text file with the ending dot msg message and then within the final easier to read the contents of it yourself and write your own messages in this case we have four floats for float64 doubles are according to explain them is another example more complicated from the sensor message topic you it is an image on the top still have a header which means our the sequence number at times them and the frame i do sometimes it's important if you have geometrical information to associated with the frame and then you have arm tight with oval images and information about encoding of the image and then add an array the date of the image chance course you can choose you can print in the contract but it's not going to show an image is all the tools for that that we learn later this example again have the header so this is a post message opposes compromises the position and orientation and here we have proposed that the position explains that and the rotation if you're given a contrarian before numbers as you can this message compromise of another message for the point you find created position to leave message messages can be nested into each other making it very easy to create new ones and building up another standard now for if people who are running already it's not very fundamental but for people who want to try you can open up the virtual machine and open up the control so we can go through some very basic exercise here together this is not part of the official exercise tips for trying a little bit house so you can open a control on their left hand tight black box Terminator can learn that you can create in one of these consoles you can create multiple views by right-clicking interests and continue to shape it horizontally or vertically you can create multiple tabs and we're going to use for the window or tab with his actions and the tab number 12 typing the raw score sharp corner rough master and you should see the output like seeing here on the right time okay to open a tab number two or split the window this control we're going to typing going to run a talker note which is already a tutorial which is pre-installed in the system you can type the roster on starting in ten LCP online tutorials package men and can talk her four-day no game once you are running the snow down the right-hand side or in your control you see that where noted running and spitting out hello world 0 and with increasing them essentially this node stitch out this message in the continent are you going to open control number three we're going to look at what is happening right now in your system so the typing in Russia list you should see the node which used to start with him confident mature the rough no list in the console you should see that you have here you were talking note that you just started now if you want to know more information about the talking about you can tighten rush node info / target which is the name of your note and then you'll see that you have the node talker which publishes on the topic chatter with of the type string essentially this node without on your control this message but also provide a topic called flash chatter where the same information is published it off as we know more about this topic you can type in Los topic intro / chatter tushy that is one publisher the top node here and there's no subscriber yet so this message is sent out to nobody we have started the run scored we opened up top node and we looked at top to note the analyzing cannot look now more closely on through the chapter topic which your chokers publishing you can do this by ross topic title and can the check node Chelsea ok this topic is of type standard messages strings you can look at the content now of your of this topic by typing in Los topic echo flash challenge which similar to your console number tool print you the confidence of his topic into your console you can see the message going up to increase number now there's other commands or just lost topic HD get hurt which provides you to frequency which is topic is published he/she type in rough topic it set flesh chatter to see that it measures for a while and can give you the average rate that would have been the max and standard deviation how fast are these messages sent out on the topic now we have the poconos running its publishing on his channel topic and now we want to start up the listener so we know that subscribe from the topic yeah you can do this by again in confident for a new console by ross runs in raschi p tutorials and can instead of talker i will use volition he's not already go i'm going to which topic that one subscribing tutorial and then you should see now 12 starts know that it out says either so we subscribe to this message and picks out the contents of which as I heard hello world some number now to see that these two notes from now working together you can go back leave him running and go back to your console number three where you analyze then you can again and come out before but Ross knows it before we only have the popular now you'll also see that you started to listen and you have these two notes running you should now have been commanded before right had been rushed optic info / chatter gives you information about this topic you see now that we have one publisher the target and now the newly-created subscriber called listener these two notes are now connected to the other topic now we are going to close to talk note so we lose eventually the guy who gives you information by going to come from to where you started and typing in control see ya then you should see that they're listening node stopped publishing messages and retrieving what we want to do now everything comes from two or three publish your own message she got a little longer command you can type in ross topic cost of publishing on the topic / shattered of type standard messages / strength and if you use a top button gives you the structure or you can fill in any message that you want to publish in this example I filled in a very close course now she's typing this command in constant forward lifting around 50 instead of hello world it certainly tells you okay this is a measure message I got that's the one you published from the conference what you saw that you can subscribe to topics and show the confidence in the console also you can publish messages from the content now we played around with some of their control command to talk a little bit about the roster built centuries system work when you're right when you download package you write your own note how you're going to build your executable library and the interpretation standard way of Ross so far has been the captain may command we suggest the much better tool the cat command line tools is already pre-installed on your system is very similar to provide nice functionality so whenever you see in a tutorial on the web can a command important the size and khaki hey build instead of catching on the line make that can catch the field which is fundamentally the same thing are but don't mix these two commands i suggest you sketching field commands and commands it kind of that i'm gonna show you in a second okay so you can typically when you want to build node you would have to go through your key works by CD and then going into your calculation then you can build a package by catkin field and then the package name appears very important part whenever you build a new package your system should know about must know about it or in order for you to use it you have to resource the console quiero you control the temperature you can type any violence and then if you're in this folder devil folder / setup fashion this can't again your environment to make sure that you are you new note that the system is aware of your you know your new package now once you build your khaki workspace you'll see that you're free full version one of the source folder of buildin father and the devil fold the fourth folder is where you put all your source code information and the bill shoulder is essentially a cash before the female folders to make system and the devil is where it puts the executables before if you installed before installing them or for you to use now these two folders have taken care of by the cat can build system i put on information there make sure it run for you don't typically never touch these to do all your work in the fourth folder where your source information store if you run into troubles one that something is mixed up to change too many things and you're not sure you want to build from scratch contestant can clean which wipes out the bills and the devil fold it doesn't touch the source folder but then you can rebuild from scratch again there's a setup associated with your captain configuration you can look at out by helping catkin comfort in the virtual machine that you got you already setup and if you can catch the conflict you should see this output one of the important parts are these he made arguments we already set himself with the future reference you can set them by taskin films gmail cars continue typing all the oxygen catch you need for example you should have built-in debarking release mode if you want to create the Eclipse project and attention but there's nothing for you to do right now just so you know in the future now we come to a second example and what I'd like to do is go beyond a typical get up website and make you download clone a git repositories is a typical tool that you'll see when working with software and then we're going to build this on your system so you can go on the website get help come / eks- ASL / Los best practices we put up there an example Ross package for you to play around once your sweats on there is a green button which is clone or download and copy this URL then you'll see in your system that you have a seat fold going through CD from your home folder you going to see begin and this is where we're going to clone now yourself a cloning me and she downloading software in a ditch format you can type in and get blown and copy paste the URL and control you can pay by control shift the show instead of control V touch control shift be you press enter this will clone all the information from this repository a few system i have seen that we focus into the kids folder it's nice to have multiple workstations future that you have one main folder where your store audition when you clone all the software that's why we put into kids and then what we're going to do now to work with it you have to simply get into your calculations you could also directly flow into your customers which will recommend you for the first your kids and then simply continue attacking a human kid you will type in LM minus desecrate symbolically and can tell it from where to where so in this case itself in the kit folder Ross best practices when the link into your captain source ok now after sinking you should see you know catching flesh force a folder loss that practice folded ok now once your clone and simulated senior captain workspace you got your camera and specialty can work space and can use to build command we saw before by typing catkin they build a loss package template if the package is for the agency positive if you feel you get here on the right-hand side is that it builds fees and charges information along a trip now to be downloaded we loan the new repository essentially to source your work with you to inform the workspaces you something you you're talking source and stable set up the cash this is important step in if you find yourself some point that your cat commercials and find your package to start having this command begin to make sure that all the information is up-to-date now we have cloned repository with built it and you can start in there we haven't finished we'll see in a second to last run you can do now Ross launched a similar topic will see the difference you can do rough lunch and the ross package template which is their package means and then Ross package kept plan template of launch which is the name of the large files that you to type of thing again use subcommand make it very quick should she a raw score starting and tuna it's a one-note actually starting to say and successfully launched note if you go through the agency that you can take source codes from the internet clone it build it and run it through all the necessary steps you need to do to them yes ok so what we do is you can have multiple workspaces so this calculation we have now only warning system in the future you see you might have multiple right so if you work in this class whatever mrs.

Know you don't want to make too many of them I'm sure to click to keep it clean instead of every time I want you in the package cloning it into the captain workspace we recommended to treat one central kids and folders from there you can simulate the different captain workspaces only the warning protection you're captain movement in this example if it also as well as to which is directly in the captain workspace it wouldn't matter checkin out in the future nice to organize the system this way that's why we shall exist some attempt it's okay so you download it built launch software for us now we're showing the last command that you use Ross launch launch essentially tool to run out of typing every time I control laughs run you can are combined them in one large file which informs the system which you know too much information that we need to load the very convenient tool to run your system he launched fires and this is important you're right one exercise our reckoning he next my language and are stored in dot launch also as a side note not yet running across master somewhere launch automatically wonders for you can see community means you can go into control talking ross launch the launch of electioneering with boot up everything that you need to start them off launch fine but you're ready if you would type in ross launch and then the name of the launch line if you already have a package like we had before you can in the first case it would need to be actually where you launch it you'll have to be at the path you want to launch launch if you wanna get the launch file associated with a rock package you can type in ross launch package management in the launch file such as you don't need to be in at this path of the finest fine before you automatically if you want to type in another example you could do like we had the target policeman before resist the launch file which launched two together introduced by ross launch gossipy tutorials and talk religion of launch this guy just the same work to get before start to talk and pollution together if you look at the listener and talker launch fighters to tell you look like you have the bottom and top you have a launch xml town and then you see that we have to line to start to note each note tagline that defies which Notre on it has parameters name this is an arbitrary name that you can choose to run under which game you want to run the note and then their key kg the package main industry 82 recipe tutorial and tell me which executable the type and the first one relation will be a blister type and the second one of talkers of talking to the output information the end tells you on where to put information that it provides indication they scream changes printed on the console but if you want you can also see log to put in a lot of side if you don't have access to the conference convenient tools people very importantly once you write your own launch files see the difference between here are closing xml that with launch and then decide to close it again and you have self-closing tags XML tags such as this note to end is this / and the very end they mean the same thing but one is supposedly and the other one can contain elements ok so whenever you'll see an xml error make sure that you have the facts correctly now here's another launch flight on the right-hand side one of the nice things you can once you build up a nice large fries you can we use it in different environments this is where the argument had complained so this example circuit simulation and has four cards for argument's ain you simulation time which weren't using people or not in which physics engines to you specified among the top light here and then you can reuse the argument in your lunchtime so in this case because if if I want to use this argument is this argument that you will fall then also set this parameter and whenever you so if you specify it up here you can reuse this argument by the dollar sign flashed package argument and the argument name which of these two examples also down here one of the nice things is once you've set up this argument you can launch your rocket launch file by launch the launch fine and then same argument name double points equal the value you can use the same launched by the former consul saying once I want to use the oldies extension for one of the bullets and you turn on and off different element very convenient way to quickly start to certain set up your note ok this is all important element you can next launch funds so in this example you see that uses include cat and then the file in this case we want to include empty words of launch which launches an empty world information of another importantly inroads don't use absolute five paths that we give you two a friend might have a different user amateur so what we always do is related to a package in this case it's fine then the package name been here to kiss you the local absolute path and ten years would be in the launch folder the Emperor lock now it's just all the launch five also need arguments you can pass them down five tapping into argument made and then the value in this case we saw that the name would be for people to know that the place-name people begin to value is the argument that i got from up there so you can pass down the value of the argument 1 launch to the other and by including testing multiple launch files you can create complex system that you can launch individually but also all at once passing down the argument any questions to the launch you're going to need to from the exercise make sure you make the XML structure is valid and then you're going to use include an urgent attention ok now one of the elements that will play around with because even simulated it's a 3d simulator for rigid body dynamics and you can include robots objects tetra kid you can also simulate sensors and she doesn't check himself husky carry a laser center for example it provides a 3d visualization which is also our interactive I mean you can have a toolbar up here where you can drop an element Duchess barks electric lighting to see the object that you drop in the robot and importantly down here you can start pause your simulation were slowing down on accelerating the video has the databases databases many different robots just posterior was time to throw about that comes along it off and give us essentially a standalone program but it comes with a rock thinking and the nice thing is in the future if you want to write so large your own tensors you can include in cville slugging to run your keyboard typing + 10 Ron just their rosters evil intentions could be unknown which open standard mp40 environment this is the end of the first picture there's for you in the future analogy of and question me rascal but the internet is full of information the most important websites believe is the key across at work where they have documentation and tutorials on each of these topics to talk to them mention there is inflation of tyler frost years tutorials and you don't want in the future you don't want to reinvent things show before you start programming something make sure that you check out existence afterward you can do this on this roster board / browse websites with all the rod packages or listen to the raw cheese if you need but you get very quickly interesting you know the party comment and for tomorrow we'll have two more links that you'll use for in the next course then we'll have Dominic explaining you exercise number one first of all let's take a look at desks shit so what you see here is that they all had always to say structure the first of all you see the theory that just recovered before then there's an exercise part and at the very end there's an evolution so check these points here you always seated there are there is the percentage of how much every point in this simulation count and every exercise has 100% and there are five exercises so you can get a most five hundred percent yeah so let's start at the top the goal of this exercise is that you get to know their office environment by first inspecting the accumulation of a husky robot that you've seen before you can set up the hospital simulation with the link that you see here there's a good description of what you have to do to get a ski running and it's so this only started husky in gazebo nothing else so there's no controller no lasers no I knew nothing just hockey installation and play a little bit around with the rafts nodes and Ross topic commands such as you can really expect what's going on Oct topics take a look at what other notes that operated what is the setup how do they interact and communicate then clone the hell up twist keyboard so as I mentioned before there's no controller running but we have no you can be around the house key with the people and you could install this from PPA or you can clone it what I what you have to do is you have to clone it from get as you did with their off best practices and then build it from source if you need a gift cheese then there's quickly we can press on you to see the very basic commands to view company and then your last ask is that you need to write launch fun have seen before that XML style file it has to start husky in the deceiver simulation with a different world so in a directory users share bc bo 2.2 as you see here there are some world toward you can pick the world did you want for example the RoboCup world then you get the nice rubber Cup what did you see in the screenshot here now all are quickly take you through the exercise so i already prepared at launch time now Peter explain for you that you can start launch filed by not yours launch the package name and during the launch fun but it can also go you can directly stop launched by without the package me because now you're going to write the launch time but you don't have to package it became very can put the launch fun right so you can just create launch anywhere and your pc and so inside boss launch and then in my case it's an internal repository so i just got your Ross launch and down the path and name the father you said you can also start the launch files without telling a package now then it should look better on your pc and the resolutions pretty bad but now you feel that it started the RoboCup world and its people manage you can start stop the simulation and now i can write and drive around a ski with my keyboard so far there for the keyboard to work you have to click on the terminal substrate is actually the window and not diseases so if i click into gives evil and then press the keyboard keyboard commands go to conceive or not the terminal that support now so this is the ankle that you have one launch files that launches people with a different role plus you're left with keyboard note then so you can type in all these commands such as roster list now you see all the notes running that's the one that you compared to compile from source so that helped with keyboard and all the others are started with the hockey launch file and there's our cute graph it shows you all the notes needs and the topics how they are connected with each other is heated here there's a telepath with keyboard know the one that I use for the keyboard commands it sends a command velocity that then goes to the people so that's how our dear house key now you see the ventilation point here first of all that setup twist keyboard nose has to be installed from source and how you see it is when you type ross CD set of twists keyboard that it goes into the folder where the source files are stored and if you if you would have installed it with the PPA and just going to your workspace it goes somewhere into your city but I can show this year quickly ross CD in a twist keyboard i haven't completed from source so now you see here that there's the system path of trust in your share but in your case there has to be your usernames and Kings workspace source any depressed okay definitely it is now they're awesome page there's there's a wiki page about pretty much everything that that's been developed for Ross important is that you on top here you have different buttons for different groceries across now we use across the Indigo not genetic so we switched for indigo and then there's some information here about how to use it how to install it and run it but we want to install it from source or completely conserved so we go here to get older and that's the exact thing that you've seen before you can clone it get clone and that's part now I go into the captain workspace source trade ya create I trade the symlink now see here that it's great definitely now it go back into the captain workspace and build it cut cane field important after you first build a package that's always the note at the bottom defense your workplace Brooks workspace package has been changed you need to resource so it means that now there's a new package around and it was now typing broth CD set of twists keyboard it still goes to my system folder because i have not forced to death so it cannot find it when I now type in source they're holed up in the catkins source tell ash so still set up ash and now the same command again ross CD and now it goes into kestenberg space set of twists people so that's the difference now it takes the program that i compile from source and not the one that welcome soul

You May Also Like