 So it's used by some data scientists in production, at least for prototyping and getting some idea of what they want to do. So if you go to this, I think Michael wrote it there, yeah, Michael put the address there. So if you guys go to collabresearch.google.com, then you can create a new notebook by clicking on a new notebook and you will just see an empty one. Oh, this is because I'm not signing in. Yeah, so you need the account of Google to create it. So you will see something like this once you have created it. You guys, I want you guys to give me some feedback every now and then because I want to see if people is following. So is people able to get the call up running? Can you guys write down a yes or a no if they are running into problems? All right. Yeah, thank you guys. That's good. Perfect. Next things, all right. So usually this is mostly used for Python because it's got a Python on the background. But we're going to do a bit of a hack. I like to use this tool on workshops because it's very easy. And I want, so what we're going to do, it's going to be a bit of a hack because we're going to install stuff on the, this runs in the background on Ubuntu machine. So we're going to install a ROS system and then we're going to try to create some stuff with the ROS. So everything is not going to be 100% smooth. Sometimes the call up system will bring it down and then we have to bring them up again. But hopefully we can manage. I've been trying it for quite a while and it seems to work OK. And I think it's a much better way than having to install the entire system because, to be honest, ROS is not a very simple system. It's a bit heavy. So it might be very overwhelming to cope with the entire install and all that. And systems, different systems, different people have different problems and that can delay a lot of the work. So that's why I decided to go with a bit of the hacky version of running everything on call up. So let's go and see how it is. So call up, for those of you that don't know it, has two main features. So basically, you can write code on the cells. This is a cell, like right down what you see here. It's a cell. So I can just write code here like I can say print and I can say hello, right? So this, and then I can press the, you can press the play here. It takes a while because it was in Italian and all that. And I said print hello, and it's printing hello. And this is Python code, right? So what we're writing here, it's in these cells, it's Python code. But today we're not going to write Python code. We're going to write C++ code. Don't worry if you don't know about it, you're not going to have to write it. You're not going to have to, I'll explain every single line that we go through. So it should be quite easy for everyone. So as I said, every single one of these cells will be a piece of code. But you can also add text. So if you click on text, you'll see that the cell that appears is different. And you can say, this is some title, right? And then this is something that you can even give it some title format or whatever. And then once you execute this, you can press Shift Enter, and then you will get some title. So this is very nice for you to give some sections to whatever we're doing here. So just keep in mind that there's a title bar, there's text and code. And you can use the text to intersect between the code. So to make it look nicer or to give sections to whatever we're doing. I'll try to do that myself. Sometimes I forget. I'll try to add some text so you guys can follow up. So for example, this one, I'm going to call it. We're going to start with an installation of the basic ROS, Install ROS. So this is the first thing that I'm going to do. And I'm going to remove this one. I'm going to start with when I remove the example of printing. And we're going to start by installing the ROS. Another thing that I want to explain before we go ahead is that in this workshop, we're going to use ROS 1. But I don't encourage anyone to use ROS 1 because ROS 1 is at the end of his life. So the last version of ROS came out already. And it's going to end up, I think, it's around 2025. But ROS 2 is already at a stage that is ready for everyone to be used. The problem is, and that's the reason we're not using ROS 2 today here, is that the version of Ubuntu that runs behind Colab, it's a specific version that contains a specific version of Python. So installing ROS 2 was a headache. And it took a long time. I was trying to compile. And I was not even successful. So there was a point that I gave up on that. And I think the concepts that we're going to explain today are quite understandable with the ROS version that comes along with the Ubuntu installation of Colab. So I think it's enough for us to grab the concepts that we're going to try to explain today. But if you want to get into ROS and after this, you want to do your own test, or you want to do your own deployments at home, please, I encourage you to do ROS 2, preferably on the latest version. So you can already start working on the latest stuff. But yeah, as I said today, things are going to be a little bit different. I'll try to explain the differences between what we're doing and ROS 2. So whoever starts with ROS 2 later can go on and learn all that from today. So the first thing that we're going to do is that because this is an Ubuntu machine, we're going to do also one thing that these cells are ready to run certain commands and Python code. So it only supports certain commands and Python code. So when we want to run a Linux command, we have to put an exclamation mark. So I'm going to put an exclamation mark, and I'm going to do apt-get update, which is basically to update the repositories. For those of you that know, Davian, you already know this one, I'm basically just updating the repos on the system right now. So everybody should be able to do this and get all the packages installed, the packages updated. So now we have all the list of packages updated from the repos. And it already comes with a version of ROS that we're going to install. So we're going to do exclamation mark, apt-get install, ROS base, that. So this is ROS base. ROS always comes with different meta packages that will install a certain group of packages that will get you started with ROS. So this basically will install the ROS-based part that we need for development. So we're going to go ahead and execute this cell. And this is going to take a while. And you'll see there's a lot of text coming out So because this is going to take a while, I'm going to go ahead and do a little bit of a presentation on what we do and all that, and a bit of the introduction of what we're going to do today, while the whole thing is installing. Anyone have any problems, just write to me on the chat so I can have a, all right. Let me know if you guys are running into problems so I can solve them. I can send you some tips. All right, so I'll run into the presentation. And this is a little bit for those of you that were not here yesterday on my talk and also to refresh a bit of the concepts that we see today, right? So yes, my name is Marco and I work at Open Robotics. And we have two main softwares, one that is called ROSE, and that is the one that we're going to mainly use today. And I'll do a little bit of a show on Gazebo so people can get an idea of what it is. So ROSE is basically to write the software for the robots and Gazebo, it's for simulating robots. So basically the idea is that you use ROSE to write the software, you test it in Gazebo and then you move the same software into a robot and it should work the same way. So a little bit about who we are. We are Open Robotics and we like to create Open Software and hybrid platforms for robotics. And we like to use those platforms to solve important problems and help others do the same. There's three main projects that we are working on. ROSE, which is the one that we're seeing today. And ROSE2, which is the current and latest version of ROSE. Then we also have the simulation part where we have Gazebo and then we also have a rewrite, which is ignition, which is a bit of a decoupled version of Gazebo with different libraries that you can use separately or together, however you want. And then we have RMF, which is the robotics middleware framework, which is what we're working in here in Singapore. And it's basically a middleware to integrate multi-fleet robots with infrastructure, lifts, managing traffic, and everything that you need to run tasks in big different infrastructures. Yeah, so that's what we're doing here. So now explaining a bit about ROSE. So ROSE, despite its name, is not an umbrella system. It's mostly a set of tools and libraries that makes easier the task of developing robots. So there's four pillars of ROSE. One of them is the plan bin. So the plan bin is a message-passing system that allows you to connect different parts of the system and let them pass information to each other. In robotics, the way we develop things in robotics is very distributed, I would say. So you would have different processes doing different tasks, and then you would have a message passing between them. So let's say you would have a camera that grabs an image, and then you would send that image to an algorithm that would do some facial recognition, and then you would do the face selection, and you would send that information to some other part of the robot that does something different. So this plan bin is, I would say, is one of the main things that ROSE provides, and it's one of the things that we're going to play around with today. Marco, can I pause you for just a moment to ask you to stop your screen share and restart your screen share? We're just trying to debug something on our YouTube live stream. Yeah, sure, I will do it right away. Thank you so much. And we run the screen share. Okay, thank you. We'll keep looking from our side. Thanks. All right. So I shall continue, right? Okay, seems okay. All right. So we were talking about plumbing, which is one of the things that we're going to test today. And then ROSE also provides tools, which is basically a bunch of tools that allows you to interact with whatever you developed, inspect it, log it, replay it, do different things to it. We're also going to play a little bit with it. There's a few tools that have a GUI, sadly because we're using this Google call-up thing, we won't be able today to use the GUI tools, but we'll be using some of the command line versions and we'll see how those work. And then we have capabilities which are mainly very cool algorithms that very smart people developed and are ready for you to be used. Like for example, if you're doing navigation, you can run a localization algorithm of SQL avoidance or whatever, it's already there, right? And then there's an entire ecosystem because this is open source, then you have an entire ecosystem of users, developers, and code that you can build up when you're working on ROSE, right? All right. So a little bit of the architecture and I think this is important. There's differences in ROSE and ROSE too because mainly because ROSE too is a rewrite of ROSE, keeping in mind everything that we learned with ROSE, right? So when ROSE was born, it was born, I would say, in a very research-oriented environment, certain things were not a priority and then as ROSE became so popular and ROSE became more and more adopted, then some of the drawbacks came to light and people realized that they should have been done in different ways or they could have been done in better ways, taking into account other aspects. So one of the key things that you would see when you use ROSE versus using ROSE too is that there's a master node. So basically, this master takes care of these communications. So you always need it running and you will see today that it's a bit of a pain to keep it running because call-up will shut it down every now and then because you need to keep it running in the background for your code to work. So every now and then, you might have to go back and rerun the master so your nodes can talk to each other. And then underneath, there's this set of libraries, ROSE-CVP or ROSE-BI, that allows you to write nodes in different languages and they can talk to each other even if they're in different languages. And then we have the communication layer and then we have the Linux system. That is for ROSE, but in ROSE too, everything is a bit different. We don't have the master. We have RCL, CPP, Python, Java and some other languages for you to write code in different languages. And then you have the RCL and then you have an abstraction layer for the communications middleware and this uses something called DDS, which is a standard. So because it's a standard, there's many vendors that provide an implementation of this standard. And in ROSE too, we allow people to use whatever vendor implementation of DDS they want. So you can easily change your implementation of DDS by just installing whatever implementation you want and just changing an environment variable on your system. And we also increase the support into Linux, Mac and Windows. So that is also an important change that we did in ROSE too. Marco, quick question. Before you had shared your screen without your video appearing in the corner and I think when you added your video in the second time the bandwidth is maybe too much. I don't know if you're able to go back to the configuration you had the first time around. We're getting kind of blurry slides. I can remove the camera. Yeah, let's try that. Hopefully that helps Patrick and others in the chat. Let us know if you... Okay, thank you. Thanks for your help. Yeah, so regarding versions of ROSE, all right. Nice. Yeah, so regarding versions of ROSE, we have Melodic and we have Noidic, which is as I said the last version of ROSE 1. So it will have an end of life on 2025. And then regarding ROSE 2, there's about much more options. We have Dashing that is currently until May. And then we also have Foxy, which is an LTS, so it will be running for three years. And then we have Galactic, which is coming next May. Once Dashing fades off, then Galactic comes over. And then we have more releases coming, and then we also have the rolling release, which tries to keep the latest code compiled for you guys. So now, we're going to have a look at what we're going to do today. So this is the first example that we're going to run. It's a very simple example, and it's the first tutorial that everyone runs in ROSE. And basically, there's this concept of nodes, which are entities that run a certain code. And if you go back to the example that I told you guys of the camera, you could have a camera with a node that picks up the images and send the images to some algorithm that does some processing with that image, like phase recognition, for example. So you could think of this publisher up on the right. Let me use this pointer. So you can think about this publisher up on the right as the camera node that is sending a message that is the image, and it comes down here to the subscriber. And this is the guy that is reading the images and is using the images to check for people in a scene. Or say this robot is trying to find people. Yeah, it's something similar to empty QTT. It's a message-passage system, so basically it's something similar to that. And then we have a topic, which is what allows you to name this flow of data. It's basically the name of this flow of data. So you can say this publisher is publishing this topic, this subscriber is subscribing to this topic. So they basically know what is the data that they're going to get. Yeah, so today we're going to focus on this version of publish subscriber, and we're going to try to make one publisher and one subscriber in our call-up. I'm going to talk a little bit about the other versions. Oh, there's more on Publish Describe. So let me finish with this. Publish Describe can also be many to many. So you can have many publishers publishing on one topic. You can have two cameras publishing images on the same topic. And then you can have one algorithm getting images for face recognition, and the other one can be just check-in for cars in the scene or something else. So it can be many to many thing. Publishers and subscribers can work on the same topic without restrictions. But then there's another way of communicating with Ross, and it's through services. So once we do services, we have a service server and a service client. And you can think about this as a remote call to a function. So basically when you call a function, you basically send a request, and then you get a response. And the message basically contains some information that goes into the request and then some information that goes into a response. Let's say like I want to add two numbers, then you can send two numbers this way, and then the server node will actually respond with one number in the other direction. That is services. But I don't think we're going to have time to get into this today. So basically this is just for you to know that it exists. For services, there can only be one server, but there can be multiple clients asking. So I can have this server doing the summing up two numbers, but then I can have as many clients as I want asking for this server to do the math. That is the services version. And actions is a bit of a more complicated concept, which basically consists of asking for a long-term goal, long-term action you can think of. And basically the client will send a request to the server. They will send a response on that request. And while the node is doing this long-term action, it will keep publishing feedback that other nodes can subscribe to figure out how the task, the action is going. And then once the action is done, there's a result that will come back at the end. As I said, we won't get into this, but it's just for you to know that it's there. So yeah, let's have some fun and try to run some ROS code. All right, so everyone should have everything installed already. It should be installed. All right, so first thing that you do on ROS1 is to run the ROS core. And it's this process that has to run always in the background and we need it so our process can communicate. Once you do it in ROS2, you realize that this ROS core becomes a pain, which is the master node. And sometimes if it's not up, we won't be able to do stuff, right? So the first thing that we're going to do is that we're going to use an iBitone function so we can run the ROS core in the background. So we do get underscore iBitone open close brackets dot systemROS system underscore ROS and now we're going to do ROS core. And that's the sign, right? So it runs in the background. And now we run this one. And you shouldn't see anything because this process will go into the background. But now let me add some text. I forgot to add some text. Running ROS core. And I'm going to move it up before this one. So let me add some title. Yeah, this is a title. Running ROS core. Now we run the ROS core. All right, so let me go down and add some code after running the ROS core. So now we have the ROS core running and there's a few things that we can do. So we can list the number of nodes that is running. So we can do, because we're going to run a normal command line, again, we're going to use the exclamation mark. So we do exclamation mark, ROS node. And let's just run ROS node and see what happens. So as we run ROS node, you'll see that it's a command line tool for printing information about ROS nodes, right? And then we have a bunch of things that we can do and a bunch of options that we can select from. And I'm going to create another cell and I'm going to do exclamation mark, ROS node list. And there we go. We have something called ROS out, which is in charge of the output and it's created by the ROS core. So that tells us that we have something, the ROS core is running and we can start doing our own stuff, right? So ROS node is for us to interact. It's one of these tools that ROS provides us to interact with nodes and then we also have ROS topic. ROS topic, which is as we run ROS topic exclamation mark also at the beginning always. As we run ROS topic, we can see that we can do different things with the topics, right? So topics are being published and we can check the bandwidth of what's going on in that topic. We can check the delay. We can check, we can echo the topic, which is very useful because we'll print whatever is being published on that topic. There's fine to find topics. There's the earth to get the publishing rate. There's info to get certain info of who is subscribing, who is publishing on that topic. There's list to list all the topics. You can actually publish directly from the command line. You can use ROS topic to publish directly from the command line and if you want to test different stuff. There's type to figure out what type of data is going through that topic, what type of message. So now we have the tool for the topic and we have the tool for the node. Now we're going to create our own ROS package and in this ROS package we're going to try to create a publisher and a subscriber and then we're going to try to run the publisher and we're going to try to run the subscriber and we're going to try to see if they exchange messages. And bear in mind that we're going to have to rerun this ROS core every now and then because sometimes the runtime will kick it out. I don't know exactly why but I think it's not very happy with processes running in the background and when you interact with them and stop your process then the ROS core also stops. So just keep in mind that if things doesn't work then you should go and rerun that one. Another thing about Colab that is important is that we have our files here so if you click on this folder on the left side you will see certain files and you can see the entire operating system the entire file system if you click on up one level and this is the entire file system that we have here. So we're going to be working a bit with files so this is important that you know where the files are and all that. All right so let's go ahead and try to create our first package and we're going to create a working space. So usually when you install ROS on the normal way it would be installed in OPT so if you follow the instructions for installing ROS it will be installed in OPT whereas because we installed the version that comes with the operating system which is a very old one and all that but we did it just so it's easier for everybody it's installed in the regular directories of the system but usually you have it in OPT and the reason that the ROS guys do this is because it's easier for everybody to install it allows you to install several different versions of ROS so usually we found out that people likes to have different versions of ROS there's many use cases where they have different versions of ROS in the same system and you have them on OPT and basically you source them whenever you need them and we'll see this source because we'll have to source our own workspace so basically you source the the ROS version that you're using and you also have to source whatever workspace that you're using and this sourcing means that it will basically load all the environment variables that are needed so you can use all the tools and you can run all your packages so let's go ahead and create our own workspace so let's go and do exclamation mark make there mkdir dash p and we're going to do on our home so we're going to use the home symbol basically this will go into root because the user has the the home on root the user of call up we're going to do catkin catkin workspace SRC so we're going to create these two directories we're going to create catkin workspace and we're going to create something called SRC which is where our source code is going to run, is going to go so we run this and somewhere here if we press this button refresh we should see the catkin workspace here we should see a source directory here so why did I call it catkin? it's because the the tool that we use to compile the software is called catkin that's another thing that changed between ROS1 and ROS2 and the new tool that we use in ROS2 is called colcon and it's much more advanced much more complete there's a read write of it so it's easier for for the developers now that we created this we're going to CD into it this command doesn't need the exclamation mark so keep in mind that you don't need to use the exclamation mark for that so we're going to go into let's run this cell and we go into the so now if we run another cell just to make sure we can do pwd let's see if this one is supported so we're already there inside this source which is where we're going to create our package so now I'm going to run a catkin create package so this is also different in ROS1 and in ROS2 so we're using a ROS1 command which is catkin create create underscore pkg this basically will create a package and in ROS2 it's a different way you do ROS2 package but the concept is the same it's just changing the way you do it basically and then we're going to call and give it a name this package so let's call it false asia package we're going to call it false asia package and we're going to add a bunch of a little bit of dependencies so we're going to use something called std messages which are the standard messages that we can use to pass between nodes we're going to use standard messages and then we're going to do cpb which is the ROS library for C++ basically for C++ code right so we're running this and nice we created a file false asia package package html created for cpb and then we also created an include directory and we also created a source directory right so it basically creates the basic files that you need and if you open the false asia package you can see that the source is created the include is created cmax list and package xml right and right now if you go into let's go back to cd our cutkin workspace so we can go back to our cutkin workspace and we can we can just compile so we can try to compile our package cutkin make there you go it's running all of the cmake and running command and it's finished so it's been built already so we created a package it's an empty package for now we we went into the walk in space you always have to go to the root of the cutkin workspace to run the build and then we build it with cutkin make which is the cutkin command to compile your workspace and now we should have something compile which is empty but we already so if we go if we refresh here we would have now a build and a double directories which contain the objects that have been created from the compilation process alright so we now know how to create a package and let me explain a bit of the stuff that we have here so the cmake slits uses cmake for those of you that don't know it's a tool that is widely used for compiling easy compilation of c++ packages and it allows you to cross compile to different operating systems and as you see this is a very big cmake file but everything is commented there's comments everywhere but it's basically so you can remove the comments whenever you need it and it's a placeholder for you to build on whenever you're adding stuff to your package you can see that we have a fine package here required components because we said that these are dependencies so as we added the dependencies to the command when we created the package these have been added here also as a dependency then if we create messages then we'll add them here if we have services we'll add them here and if we have action trials we will add them here right and then we will add at the bottom whatever libraries or if we're creating binary files at any point and we'll do that in a moment so we have the cmake we have the package xml I found out that for some reason Collab doesn't let me edit the package xml so I have a trick for you guys and the trick I know this is very hacky but I know already running ROS on a Collab is hacky so there's many shortcuts that we have to take and we have to rename the package so Collab can allow us to edit it so if you rename it yeah so if you rename it to a TXT then you will be able to open it here which is an easier way to modify it just keep in mind that you have to rename it back again later so basically the package xml contains the information about the package and here's where you state the name of the package this here is where you state the version some description about it this is a package that we built in first Asia and all that and there's dependencies that you should write down here and basically these dependencies will tell what is the building tool that is used what dependencies are this package depends on and on execution time or on build time it's very important that this is correct because then there's tools from ROS like ROSDEP they will use this heavily and ROSDEP is a tool to automatically install all your dependencies so it's very important that this information is accurate because otherwise it will become very hard to maintain your code and it will become almost impossible to keep track of what you're doing so let me go back and rename it I don't know if I can keep it there let me see let me go back and rename it I think it will create a dxt file though I think that happened before so after now let's recap we have our package we have our package xml we have the source where we will put our cpp files and then we will have our include which is where we will put our header files if any now we're going to go into the this folder we're going to go into this folder and we're going to download the publisher and we're going to download the subscriber and we're going to put them here and we're going to compile them and see what happens let me go let's check where we are so let's do pwd so we're we're going to just move us into src force age package src so let's go there right and now that we're here we're going to download I'm going to just paste this because this is a big command we're going to download an example from the rose tutorials page and let me just copy it the whole URL I'll put the entire command so you guys can just copy paste so this is the first one and this is the docker so you guys just copy that so it's doing exclamation mark which is basically this command line tool that downloads files from the web and we're going to download this cpp file and we just run it and we got the docker now and now if you check the src remember that you have to press refresh because call up one refresh by itself now we have the docker here and if you double click you should be able to see the docker on the side the code of the docker and there's a lot of comments there's a lot of comments here this is not the docker so we got a copyright from morgan and a guy from wheelbarish which is when these were written and there's a lot of stuff we got the headers so we got the ROS header which is basically the main one that you have to include and then we got a string which is the message that we're going to use this is the standard message that's why we were depending on standard messages if you remember and we using sstream this is the way c++ uses for managing streams and then we create a main which is the main function in c++ for those of you that don't know c++ we do a ROS edit very simple with the name of the node so the name of the node is going to be docker so this node is going to be called docker and we create a node handle and then using the node handle here we create we say that we're going to create a publisher wait let me just think this is too small maybe make it a bit bigger so we got the node handle here and from the node handle we create the chapter and this is the frequency which is 1000 and we're going to make it we create this this advertise function will return a publisher for us and we save it here chapter pub and we create an object we create a loop rate this loop rate is going to basically allow us to to have a loop and pause it every now and then and we have a counter here and then we say while ROS this is pretty standard and then we create a message we create a stream so we pass this hello world to the stream and then we just create get the string from the stream and then put it into the message data field so there's a data field in the message that contains the string and then we use the function ROS info to print it out and then we do the chapter pub which is the publisher that we created up here we created a chapter pub if you remember and we call the function publish with the message and the message is published right here and then we do ROS spin once which basically tells the executor to execute to give time to execute whatever is on the executor then we have a loop rate sleep we sleep for a while so it doesn't go crazy and then we add account for our message right so we have account that keeps the number here and it keeps increasing so we can see hello world one hello world two hello world three there's many comments here so feel free to play around with it read them and you can also go to the website if you have some doubts well they explain in more detail everything that is done on the docker so now we created we got a docker let's download the listener so the docker is the guy that is publishing and the listener is the guy that is subscribing let me copy this let me put it so this is the this is the listener and this is the subscriber that we're gonna use so if you run this you should be able to get the file on your oh I think where was it we got it all right yeah so we got it here right should be in sse yeah this and our and docker right I see some guys are having still having problems remember that if you don't see let me share this again remember that if you don't see the if you don't see my screen or whatever you can also just access this link and you should be able to access everything that I'm writing and you should be able to copy into your into your own collab version all right so going back to the subscriber right so we got the listener here so let's have a look and open the listener all right so we have the listener again including Ross and and string and then we have a call back here which basically gets message type string that it's the message that we were publishing with the other guy and we're just printing it using Ross info right so this this macro from Ross allows us to print strings so we're gonna print I heard and whatever it's on the message right so this is a C string and we're gonna print that in here this placeholder and then we have the main main faction as I said we also do Ross edit with the name of the note which is a listener then we create a Ross note handle and with the note handle we create a subscriber similar process by just doing the subscriber version and we call it we do a chatter we subscribe to chatter and then we tell the subscription to every time there's a topic in chatter there's a message in chatter call this chatter call back right so every time there's a message in the topic it will be called this function here right and because this is a type of message it will be called with the type of message that it's been passed in that in that topic right so we got the subscription here then we do a Ross pin which is standard also and then we return zero and that's it very simple alright so we got our publisher we got our subscriber and now what we need to do is that we need to add the specific lines in the CMAKE list so the compilation it's aware that we have now a docker cpp and a listener cpp and we want to compile them and these lines are pretty simple and I should be able to get them for you guys so we don't have to write too much because that takes time and I'm lazy and let me just get it from here alright so I'll paste them on the chat so everyone can get them alright so there you go you guys have them in the chat and now we're going to paste them at the end let's just paste them at the end they should work right so basically we're telling we're telling CMAKE to add executable that it's called docker and has the source that is this cpp and it links to the normal catkin libraries and has the dependencies the normal dependencies docker and the generate messages cpp and the same for the listener it's the pretty simple way to add executables into the CMAKE list right so when we added this when you modify you should see an asterisk here so if I do something you see there's an asterisk here and after a while it auto saves itself if you click away I think it should save itself and it's removed so then you're safe and you know that the file is already saved and you can continue with your work on whatever you continue doing so almost there we got docker, we got the listener we got the publisher and the subscriber so now we're going to go back to the we want to go back to catkin workspace so we can compile our two nodes so we're going to go without the exclamation mark it looks already without it so we're going to go to uh catkin workspace so now we're back at root catkin workspace and now we're going to do our catkin make exclamation mark catkin make and you will see all the output from the um alright and it's built and our listener is built so now we're going to try to run our docker so let's try just to uh so to run an executable in in ROS you will do you will use something called ROSRUN so let's run ROSRUN and this will show you how to use ROSRUN and it's basically telling you that you have to uh tell there's a few options that you can use but you basically have to use the package name and the executable so let's go ahead and use the package name which is FORCE Asia package and uh we're going to run the docker right so let's run the docker and let's see what happens and it's saying that the FORCE Asia package is not found why is that happening it's because the environment is not ready to find our package yet and why is that it's because you have to run um let me run you have to write uh you have to source the install um the setup dot bash that you have uh on your devil directory and as I said this is very common and this is uh a thing that you will have to do whenever you install the ROS from the official repositories because we want to keep it separate and we want you to source the different versions that you want to use in whatever way you want to do them um and because we're having a workspace that is specific for us then we have to source the uh the setup dot bash um because there's uh colab doesn't keep the environment variables between cells we'll have to do it in the same cell uh we're going to do it in the same line so I'm going to just write between the exclamation mark and the ROS run and I'm going to just say source devil um for the slash here and I'm going to say setup dot bash and I'm going to do as to son as to son right so basically what we're doing here is that I say please source this setup dot bash file and ROS run me this talker um ROS run from the package for sysia package ROS run the talker node and now I'm going to execute this cell and you can see that now uh we're publishing this hello world 0 hello world blah blah blah right keeps going on forever because we have if you remember we had a wild ROS ok on all talker so if you come to the talker um there's some uh while ROS ok and ROS seems to be ok so it keeps going right um um so if I click here I know collab uh becomes a bit annoying and it takes some time um so you guys can see that uh it is it's hard to stop the the binary uh let me just clear this uh how to clear this because it becomes annoying uh yeah there's a point where uh collab will kill it when you click too much uh but at the same time it will also clear uh probably kill the um uh ROS core as I said that we have here right so ROS core is here uh we'll have to rerun ROS core um we can just check if we do um um ROS node list you will see that it's uh unable to communicate with the master so there's no master running so we have to go back all the way up to the line where we were running the ROS core uh here uh get a python system for ROS core and then we run the ROS core again right um now if we run ROS node list we'll see that ROS out is already there right so we want to run this but we want to run it in the background so we're gonna do the same thing that we did with the ROS core uh we're gonna do get python and then we're gonna do system ROS and then we're gonna put this into the brackets and between single quotes and remember to add the aspen sign at the end so this runs in the background right so we run this so um without the exclamation mark sorry no exclamation mark alright so now that is running in the background and we can do ROS node list and we'll see now that we have a talker right so our talker is running in the background uh what else we can do we can do ROS topic list ROS topic list oh we got a chatter now what is this chatter doing ah we can check let's go check so we can do ROS topic echo chat oh let's do let's we can do some other stuff right ROS topic let's see what ROS topic allows us to do so I can do type let me do type ROS topic type of chatter you guys remember what chatter was doing uh what type of of message was chatter let's see oh it's uh it's from the standard messages uh it's the message string so that's the one that we define if you remember right remember standard messages a string that's the type of uh ROS topic uh ROS topic what else can we do let's see all the options um we can check let's see if we can check this so we can get the rate and it's been published right so these are the tools that uh ROS is providing us to interact with our system and to insrespect what is going on um we can also there's there's also another tool um that it's not I don't think it's installed with the base one but it's called ROS back let's see if it's installed I don't think it's installed oh yeah it is yeah so ROS back is another tool that you can use uh in ROS to basically record uh information from these topics and then you can replay it later and this is a very useful tool because you can you can basically use it uh at any point uh and you could you could you could use it with this let's say with a real robot right you have let's say you have five hours with a robot and then you have to go home and and you want to continue later um so basically you you will do a ROS back you will save all the information that you want and then you can replay it later and then you'll have all the topics uh ready for you to rerun uh different algorithms uh with the same exact uh information coming out of the robot so that is this is very good to get uh some deterministic input uh that you can play around with um um and also to replay information um when you don't actually have the source of that information right um so if you borrow a camera from a guy one day and then you want to play around with the data for the next week then you can use a ROS back and and it makes things much easier right or setting up a robot whoever did it uh ever it's always a pain you have to turn on a lot of things a lot of things can fail so you can set it up once uh get a ROS back and then play around with the ROS back uh for the next week you don't have to go back and do the whole setup again uh very useful tool um all right so we should have the rosno in the background right rosno list again oh the master is gone again I told you guys the master goes off every now and then when we uh so we go back rerun the master remember this is very important every now and then the colap will kill our master and now we can do rosno list and we only have ros out because the master died so also our uh docker died so we already run the docker I know this is a lot of reruns um but um that's how um colap works it's killing our background processes so we got the docker now and we got the list uh let's sort of run the subscriber let's go run the subscriber um so we're gonna do the rosrun and then find my mouse all right there so we're gonna do rosrun rosasia package right so from the rosasia package we're gonna run the list right and again one thing that I'm missing here is to source the setup bush as I said this is this is only specific to colap you only need to do it once per terminal on your computer uh but because colap doesn't keep the environment variables between cells then you have to do it um and in every cell um maybe there's a way to keep the environment variables but um I'm just not aware of it I didn't found it devil setup dot bush all right so we're sourcing the bash and that's the sign that's the sign rosrun false asia package listener right so this listener should basically um should what was the name uh yeah should subscribe to chat and should be uh publishing uh printing whatever the chapter is is is uh publishing so if we go to the listener here the rosin for that we had right so it would call this this callback here and it will say I hear and whatever is here it will be placed in this place holder here right let's see if it's true let's run it and there you go it's an I hear hello world and a very big number because this uh doctor has been talking for quite a while now and yep a bunch of hello world messages so congratulations everybody you wrote your first publish describe uh demo with ros uh now you're able to create your own robots uh please uh go ahead and go get more tutorials let me just uh talk a bit about like uh other um other command line tools they need to stop this one now we stopped it and let me clear the output because it's very long all right so we're almost done with the roast part um just a couple of things uh there's a roast service list uh roast service will allow you to play around with services so as I said publish describe is not the only way to communicate nodes in roast you also have services there's uh different arguments that you can call services from the command line you can list them you can check the type in a similar way with the services and then you can call get the result and all that there's also uh definitions of you have to define messages so in this case we use the standard messages but you can define your own messages uh with different fields so a way to check that is to use the roast msg um tool and with that tool it allows you to list the messages uh check the uh md5 um check information about the messages and you can also do the same for srve roast srve which is the message for services so basically these these ones are a bit different they have uh as we said there's uh there's a type of information going to the server and there's a type of information coming back to the client and and you can insuspect this in the system using this command um there's a bunch of other commands but i think we don't have much time so for now i'm going to stop the the roast part here um so call up uh it's done um remember that you guys can access my call up if you guys want to copy anything um apologies for not adding the the text i i told you guys i will forget i always forget uh but feel free to add it on your version make it pretty and all that um just a quick uh review of uh gazebo uh because this uh it requires you to install gazebo uh this is not uh hands-on workshop so i'll just showcase uh whatever it's there uh very quickly and and you guys can have a look uh so the the basic idea is that once we done our roast uh well once we wrote a roast uh code we have uh something called gazebo that allows us to have simulated robots and then we can you can use our topics to talk to these simulated robots right and the main idea of gazebo is to make it as close as a real robot as it can be so you as as you have your your notes of roast running talking to the simulated robot in gazebo and you you get your real robot then switch your code and instead of uh publishing and subscribing to gazebo you can publish and subscribe to the real robot and it should just work um so gazebo tries to provide physics sensors at gy it provides the interfaces so you can connect with roast which is what we uh recommend and it's what we do but you can also um you can also connect with everything uh anything else that you want you can you can create your own interfaces and connect to gazebo there's a cpp library that allows you to connect directly um from uh uh i'm trying to simulate navigation system with the gps and come if it is possible to simulate our gps on gazebo so gazebo uh allows you to um i'm not i haven't used gazebo that much to say if there's a gps i'm pretty sure that you can simulate uh i'm 100% sure that you can do it because gazebo has something called plugins so you can write down your own plugins and and if there's no uh is this that device that you're you find missing in gazebo you can just write your own and then load the plugin and that will do it for you so it's very it's modular uh not as modular as the new rewrite as ignition but you can you can run your own plugins and create or your own devices on on on gazebo um yeah uh there's a couple of versions that are running these days gazebo 11 and gazebo 9 are the main ones uh that are currently alive and as i said the main point is to have the simulated world as close as the real world so we can use the same code and in our case as i said we use ross but uh you can use whatever code you want um uh there's tcpip sockets so it doesn't have to be ross it can be different ways of connecting but we provide the gazebo ross packages so you can uh connect your topics directly into gazebo all right so let me just run uh gazebo a bit uh yeah so gazebo uses world files all right uh so gazebo uses world files so here um let me just close this uh let me just uh i'm gonna share a different screen now because i'm gonna try to i'm trying to figure out which is the screen see if this is screen no this doesn't seem to be the screen okay um okay let me just run the gazebo so we don't run into all right then i'll share just the gazebo screen not asking now marco you may want to try to uh stop sharing your camera first and then share your screen i think i found it it should be working now let me just try yeah that should be fine all right so you guys should be seeing the gazebo now um yeah so this is the simulator environment i'm just running one of the models that uh was available there and it's basically just uh moving around so the purpose of this uh was to um yeah hopefully you guys can see it in a bit i think it takes a while all right yeah um yeah so uh gazebo provides a lot of tools there's a heat in it's very hard to open there's there's a bunch of stuff that you can um you can do around with it there's a world uh where you have the models so i have an actor here this is my actor um you have uh gazebo worlds are saved in world files and you have different tools you can move your your guys uh from one place you can move your models uh you can play around with them there's different ways of moving your models here there's you can add basic uh basic stuff uh this is at the bottom you can see the simulation the simulation parameters so basically you can stop the simulation you can play it uh you can you can jump steps on the simulation and then you also have a real time factor that indicates uh what is uh compare simulation time compared to the real time what is the difference so right now we're 0.95 so it's a bit below real time and we have a start time uh simulation time and a real time which won't be different right uh because we're we're not running uh the real time factor one so if we're running a real time factor one simulation time and real time will be the same uh then you have the steps and iterations that are going on and uh fps uh the frames per second and you can reset time here um there's many options here uh basically to move your models this is to to align your models uh play around with the lights you can set up lights uh you can do um all all the all the tools basic tools that you want to move your models and there's uh on the world you can you can play around with uh with a GUI you can play around with um um you can play around with the spherical coordinates we can play around with physics uh this is one of the most important ones you can select the physics engine that it's running so it's uh running ODE which is the default one uh but you can you can change this and compilation time uh this is a bit easier with um this is a bit easier with ignition uh because uh that doesn't have to be compiled and all that so this becomes much easier you can you can change the real time uh maximum real time so if you wanted to run uh this is uh 10 times 10 seconds at real time uh you can select the steps of with the physics are running and there's uh gravity that is uh 9.8 as everyone knows uh but you can change it and you can make it a different uh gravity there's magnetic field on the physics uh you get your solvers these are constraints you get wind you get um pressure you get different different values that you can adjust on your simulation uh to make it uh more accurate to whatever model you want to to change and then you can insert different uh models so there's there's a bunch of models that you can you can select from so I have my models here and these are the models that we've been using for um uh for our projects rmf uh and you can you can basically just drag and drop them and play around with them uh you can download models from gazebo shin and Marco have kind of questions on getting this up and running um would you be available and like see uh the chat room uh later today perhaps or is there another good way to reach you with any follow-up questions people have about gazebo or are we? Yeah so I'll wrap it up here um if you guys have more questions um uh we have the office hours of um of the open robotics so you can check it out on the the activator page I can paste it here and then of course I'll hang out a bit on the um discussion uh room for a while if anyone wants to ask five questions fantastic now really really appreciate all of your insights here today um and what a great what a great workshop what a way to start day two uh I am I am charged up and ready to go we've got a great day lined up um as Marco said um we've got a lot of exhibitors the next hour in fact we have an exhibition showcase over in the main hall room uh you can hang out with Marco a little more for follow-up in the in the discussion room and tons of great content uh for many many more hours today on uh open source firmware open hardware we're gonna get more from our colleagues in Africa and some lightning talks lots of great stuff here later today so stay tuned check the schedule and um thank you for joining us here the last 90 minutes uh you've got another 60 seconds or so before the before the exhibition uh showcase kicks off over in the main room and thank you all for for joining us feel free to hang out yeah as Mario said you can you can hang out here and stay empty for a while so feel free to follow up here and we'll sign it off officially for the workshop thank you again Marco we really appreciate it and always enjoy learning from you thank you thank you guys take care everyone have a great day