ROS2 For Beginners - Build Robotics Applications with Robot Operating System 2 | Edouard Renard | Skillshare

Playback Speed


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

ROS2 For Beginners - Build Robotics Applications with Robot Operating System 2

teacher avatar Edouard Renard, Software Engineer and Entrepreneur

Watch this class and thousands more

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

Watch this class and thousands more

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

Lessons in This Class

90 Lessons (11h 19m)
    • 1. Introduction

      3:02
    • 2. What is ROS2, When to use it, and Why?

      6:47
    • 3. Tips to get started with the class

      1:50
    • 4. Install ROS2 and Setup Your Environment

      1:00
    • 5. Which ROS2 Distribution to Use

      4:38
    • 6. Install Ubuntu 20.04 on a Virtual Machine

      16:09
    • 7. Programming Tools I Use During This Course

      3:44
    • 8. Install ROS2 Foxy Fitzroy on Ubuntu 20.04

      6:04
    • 9. Setup Your Environment for ROS2

      2:16
    • 10. Launch a ROS2 Program!

      2:48
    • 11. Write Your First ROS2 Program

      1:18
    • 12. Install the ROS2 Build Tool - colcon

      2:18
    • 13. Create a ROS2 Workspace

      4:08
    • 14. Create a Python Package

      5:57
    • 15. Create a C++ Package

      4:08
    • 16. What is a ROS2 Node?

      7:35
    • 17. Write a Python Node - Minimal Code

      14:57
    • 18. Write a Python Node - With OOP

      7:46
    • 19. Write a C++ Node - Minimal Code

      13:36
    • 20. Write a C++ Node - With OOP

      9:44
    • 21. OOP Template for Your Nodes

      1:54
    • 22. More About the ROS2 Client Libraries for Different Languages

      2:31
    • 23. Introduction to ROS2 Tools

      1:03
    • 24. Debug and Monitor Your Nodes with ros2 cli

      9:57
    • 25. Rename a Node at Runtime

      6:02
    • 26. Colcon

      5:00
    • 27. Rqt and rqt_graph

      3:48
    • 28. Discover Turtlesim

      4:53
    • 29. Activity 001 - ROS2 Nodes and Tools

      0:53
    • 30. Activity 001 - Solution

      4:25
    • 31. ROS2 Topics - Make Your Nodes Communicate

      0:45
    • 32. What is a ROS2 Topic?

      9:00
    • 33. Write a Python Publisher

      18:20
    • 34. Write a Python Subscriber

      9:36
    • 35. Write a C++ Publisher

      17:11
    • 36. Write a C++ Subscriber

      10:01
    • 37. Debug Topics with Command Line Tools

      7:07
    • 38. Remap a Topic at Runtime

      3:38
    • 39. Monitor Topics with rqt and rqt_graph

      6:18
    • 40. Experiment on Topics with Turtlesim

      4:53
    • 41. Activity 002 - ROS2 Topics

      1:01
    • 42. Activity 002 - Solution [1/2]

      8:47
    • 43. Activity 002 - Solution [2/2]

      11:09
    • 44. ROS2 Services - Client/Server Interactions Between Nodes

      0:54
    • 45. What is a ROS2 Service?

      7:00
    • 46. Write a Python Service Server

      13:40
    • 47. Write a Python Service Client - no OOP

      13:44
    • 48. Write a Python Service Client - OOP

      12:13
    • 49. Write a C++ Service Server

      14:43
    • 50. Write a C++ Service Client - no OOP

      14:23
    • 51. Write a C++ Service Client - OOP

      17:13
    • 52. Debug Services with ROS2 Tools

      4:50
    • 53. Remap a Service at Runtime

      3:09
    • 54. Experiment on Services with Turtlesim

      7:48
    • 55. Activity 003 - ROS2 Services

      0:51
    • 56. Activity 003 - Solution

      11:56
    • 57. Create Custom ROS2 Interfaces (Msg and Srv)

      0:45
    • 58. What are ROS2 Interfaces?

      11:34
    • 59. Create and Build Your First Custom Msg

      13:50
    • 60. Use your Custom Msg in a Python Node

      10:27
    • 61. Use your Custom Msg in a C++ Node

      4:27
    • 62. Create and Build your First Custom Srv

      4:32
    • 63. Debug Msg and Srv with ROS2 Tools

      7:06
    • 64. Activity 004 - Custom Interfaces

      1:53
    • 65. Activity 004 - Solution [1/3]

      10:54
    • 66. Activity 004 - Solution [2/3]

      13:31
    • 67. Activity 004 - Solution [3/3]

      19:32
    • 68. ROS2 Parameters - Change Node Settings at Runtime

      0:31
    • 69. What is a ROS2 Parameter?

      3:18
    • 70. Declare Your Parameters

      12:17
    • 71. Get Parameters from a Python Node

      11:32
    • 72. Get Parameters from a C++ Node

      9:38
    • 73. Activity 005 - ROS2 Parameters

      0:19
    • 74. Activity 005 - Solution [1/2]

      5:58
    • 75. Activity 005 - Solution [2/2]

      4:20
    • 76. ROS2 Launch Files - Scale Your Application

      0:49
    • 77. What is a ROS2 Launch File?

      2:31
    • 78. Create and Install a Launch File

      14:19
    • 79. Configure Your Nodes in a Launch File

      6:41
    • 80. Activity 006 - ROS2 Launch Files

      0:40
    • 81. Activity 006 - Solution

      11:17
    • 82. Turtlesim Project - Instructions

      1:39
    • 83. Turtlesim Project - Step 1/6

      28:29
    • 84. Turtlesim Project - Step 2/6

      15:40
    • 85. Turtlesim Project - Step 3/6

      17:09
    • 86. Turtlesim Project - Step 4/6

      19:09
    • 87. Turtlesim Project - Step 5/6

      7:26
    • 88. Turtlesim Project - Step 6/6

      12:24
    • 89. What You've Learned

      1:52
    • 90. What to do Next?

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

Community Generated

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

273

Students

2

Projects

About This Class

In this class, I will take you, step by step, in a few hours, from a complete beginner to a ROS2 developer who can write scalable robotics applications.

→ You are learning ROS2 from scratch?

And you may ask yourself: Where to start? How to learn? What to do first?

When I first got started using Robot Operating System, it was really hard for me to answer those questions. Thus, learning ROS/ROS2 was hard. But it doesn’t have to be, if you learn with the right resources.

Also, something I noticed is that when people are teaching ROS2 (in 2020), they are often making comparisons with ROS1. But, what if you don’t know ROS1 ???

I have created this class so you can properly learn ROS2 from the beginning, with no prior knowledge in Robot Operating System, and without having to waste weeks, or even months, trying to find what to do. You can say goodbye to this big learning curve everyone faces when learning ROS2.

The class is structured so that you can follow it, one step at a time, and get everything you need in the right order. At the end of the class, you’ll be confident enough to start your own Robot Operating System 2 application.

→ How do I teach?

Here’s my teaching method, in 3 points:

  • Step by step.
  • Going to the point.
  • Practice, practice, practice.

That’s it. No useless stuff and distraction, just the important things you need in order to create ROS2 applications.

My experience with Robot Operating System is very practical. I actually used it to build a robotic arm that is now on the market. So I had no other choice than being practical and going to the point. And that’s the way I want to teach you.

→ So, what are you going to learn?

Here are the main concepts you’ll see in this class:

  • ROS2 Installation, Workspace, Packages, …
  • ROS2 Nodes
  • ROS2 Topics
  • ROS2 Services
  • ROS2 Custom Messages
  • ROS2 Parameters
  • ROS2 Launch Files
  • ...

Each section/module of the class is focused on one ROS2 key concept. For each concept, you’ll get:

  • Concept explanation, with the context, and why you need to learn that.
  • Step by Step “how to” videos (for both Python and Cpp).
  • An activity to practice + detailed solution video.
  • A recap + code download of everything we did in the section.

I like to start with the “why” question, which is, to me, the most important question you can ask. If you understand the “why”, then everything after that will make sense because you know where you’re going, and why you’re going there.

I also take the time to write all the code with you. Some teachers and instructors like to show you a huge bunch of code and then tell you “ok this code does that”. I personally don’t do this. When I write code, I write it completely, with you, and I explain why I’m writing what I write.

At the end of the class, you will have the opportunity to work on a complete project, using the Turtlesim simulation. This will help you practice more on everything you’ll see in the class, and that will be your first real project from A to Z.

Along the class you’ll also learn how to use ROS2 tools to debug your application, monitor what’s going on, and build your code.

With everything you’ll learn + the best practices I’ll give you, you will be ready to start any ROS2 project with a good foundation.

 

--------------------

This class is for:

  • Students, Engineers, Researchers, Teachers, Developers, Hobbyists.
  • Anyone who wants to learn about ROS2 from scratch, and not waste time.
  • People who want to build scalable robotics applications, faster.
  • ROS1 developers who are still at a beginner level and want to start learning ROS2.

This class is not for you if you:

  • Are already a ROS2 advanced or expert developer.
  • Have never used Python or C++ before.
  • Also, this is not a “ROS1 to ROS2” guide. This is a class where you learn ROS2 from scratch, with no ROS1 knowledge required.

Pre-requisites for this class:

  • Programming basics in Python and/or C++
  • Some basics in Object Oriented Programming (OOP) are welcome, although not 100% mandatory
  • You need to know how to use basic commands in a terminal
  • And of course, a strong willingness to learn
  • Precision: No need to know anything about ROS1!

Meet Your Teacher

Teacher Profile Image

Edouard Renard

Software Engineer and Entrepreneur

Teacher

Hi, I'm Edouard. I’m a software engineer and entrepreneur.

I’ve been working on programming robots for years. When I first started I really had a lot of trouble trying to properly learn. I found what works and what doesn’t work, what I needed, and what I didn’t need. So now I’m sharing that with you, so you can save the precious time you have.

Also I have co founded a robotics startup and programmed an entire robotic arm from scratch, with ROS, Raspberry Pi and Arduino. My view on software and robotics is very practical: I’m interested in how to best use a language/framework to build useful applications. 

And thus the approach I have in my online courses is really down to earth and practical.

I like to make complex stu... See full profile

Class Ratings

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

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

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

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

Transcripts

1. Introduction: Welcome to this course on Robot Operating System 2. You want to develop powerful and scalable robotic applications you want to learn ROS2 from scratch and master the core functionalities... but without the usual steep learning curve. Well, you are in the right place. I'm Edouard a software engineer and entrepreneur. In the past, I have programmed an entire, six axis robotic arm. with ROS, from scratch. Then I have worked extensively with this new vision of ROS named ROS2. When I started using ROS, I had trouble finding well structured courses and tutorials to show me what's important to do at the beginning, where to start, what to focus on and which path to follow. That is why I created the course that I wish I had when I began, so you can learn much faster than I did. This is a step by step course structured in a way that makes it easy to follow for beginners and directly going to the point through a ton of practice. At the end of the course, you will master the ROS2 basics, and you will be able to create a complete robotics application using all the ROS2 core concepts. In this course, you will not only see the how, but also the why which is even more important. You will learn how to install and setup ROS2 to on a Ubuntu operating system, how to create, build and use ROS2 nodes, topics, services, messages, parameters, launch files and much more. All those points are key concepts that you need in order to use ROS2 efficiently. And of course, you will discover some of the most important ROS2 tools which will help you save some development time. You will so practice a lot, thanks to many activities, I will take the time to write to code with you, explain every single step and give you some challenges to make you progress on key concepts. Oh, and all the code will be written in Python and also in C++. So you can completely learn ROS2 with those two languages if you want to. And that's not all. At the end of the course, you will work on a complete ROS2. mini project using the turtlesim simulation so you can practice on everything you will see in this course. All you need is to know how to deal with a terminal and have some basic knowledge in programming. During this course. I will also give you some of the best practices I personally learned when developing with ROS2 Because what I want is that at the end of the course, you're able to develop not good, but great and scalable robotics applications. 2. What is ROS2, When to use it, and Why?: first of all before we even go to the why, when and what runs to is the 60 so off Russ one. It's basically the next version, but with the same goals and core concepts just better and with more functionalities. So when I talk about Ross, too, I also talk about Ross in general. All right, so why you're us to Let's start with those three robots. What is the common point between them? Well, on the robots you see here can be powered by Ross R. Us, too. Ross means robot operating system. It is something between a mirror where in a framework build, especially for robotics applications rose to go is to provide a standard for robotics software that developers can use and reuse in an era. But once you know how to use rose to efficiently, you will be able to set up a new software for your a boat. In no time, you first need to master the basics and call functionalities, which you were seeing the schools, and then for every in your about your program, you gain more skills that can apply toe other robots. The more you know about rush to the easiest. It will be for you toe program and understand the code of any robot. But in that it no, another part of the philosophy behind Ross is don't reinvent the wheel are inventing the wheel is a very common programming robotics. Many people always start building use software that is already existing, and thus they don't have the time to work on really valuable stuff. What if, instead, you could build on a strong software base to directly program high level functionalities and walk on use cases instead off load of a technical stuff that already exists anyway? So this is the why behind Ross know when to use Ross. Maybe you've already studied toe program Roberts with an Arduino board with a system code on a computer and what you will quickly experience it that the more sensors traders controllers you add on your application, the more complacent becomes until you reach a point where everything is mixed up and you can't add any code for nuisance or without having a huge headache For us to is here to help you develop powerful and scannable Robert applications, you can use it whenever you want to create a Robert software which needs a lot of communication between it's the programs. Are has some functionalities that go beyond a very simple use case so far, a Robert that will just open a door with a several model when it detects a movement. Maybe you don't need a rustic, but find more by Robert, which you want to control with a GPS and a camera in this case runs to might. Ready? Help? You all right? You've just seen the why behind rose to and went to use it. Now what is rusty? Well, it would be hard to describe exactly what is rushed to in about two minutes, even our But here are two main points that we give you a 90 of the big picture. First of all, rushed to provide you with a way off separating your code into raise able blocks along with a set of communication tools. Toe easily communicates between all yourself programs. Let's say that you are programming a worldwide robot. You can create a SER program called node for your camera. Another father navigation. I grayton another one for the how to a driver. And as I went for a joystick and so on, and each of those independent blocks will communicate between each other in a way that is powerful and scalable. The single main point is that Rose to provide you with many tools and plug and play libraries. That will save you a huge amount of time and, most importantly, that we prevent you from reinventing the wheel. If we come back to the move, I Robert, imagine how difficult it can be to compute a tragic story which will make the robot moving smoothly, avoid any of cycle on the way and also work with other robots at the same time. Well, impossible, you might think, unless you spend something like two years studying mathematics pass planning algorithm, etcetera. But what if I tell you these? You don't need two years? We've rushed to union maybe two days to install a library and figure out how to use it. So you have great communication tools and great libraries. That's not all. Ross is said to be language agnostic. It means that you can program some pats off your application in a problem in long wage and another path in another programming long wage, simply because the communication tools don't rely on a specific language. So in day, schools will not go into all the external libraries that exist. For many front Roberts, we will mostly focus on the roster basics call functionalities and tools that will allow you to Is that any robot application for world by rose to using python and see to finish? Russ two is also open source with a knack, active and growing community so you can directly see what's going on. You can easily get help. You can share your project and even contribute if you wish to. All right. With these quick introduction, you should get some ideas about what is the rush to and why is it useful? Don't bending, though, if you don't understand everything. Right now, the big picture behind Rose to is bread. We have to get at the beginning, but after some practice your started, get it, and I can guarantee you that you will quickly think at Ross. Two is out, some for your robotics projects 3. Tips to get started with the class: Here are a few tips to help you navigate the class and find the additional Russell sees. If you go on the projects and resources stab, you will find a bunch of things to download. So don't know that everything right now. So you're down with that. First, you have the projects and activities Pdf you will find here all instructions, complete instructions for our projects and activities inside the class. When it's time to do a project, you will get a quick video introduction, plus the PF and then another video for the solution. I find it a pdf version more appropriate for complete instructions about the project. Our activity so you can keep it under side to always have all the instructions, the label while you work on the project. And then you have a not drive containing all the code written in this class. We will start from scratch and every time we write some code, it will be added to what we already have. So to make it simpler for you, I have created occurred. Okay, for every step, when you finish the lessons about topics, for example, you can use the topic cut archive where you will find all the code written until this point and also containing the many projects I give you a long discuss. Now a few recommendations off course. Write the code as I write. Don't just watch it you can pose are rewind the video at any time and do the activities and projects by yourself. At least give you some time to try before you watch this solution. 4. Install ROS2 and Setup Your Environment: in the next few lessons, you will set up your undergarment and in Star Rush to. So I would explain which roster version you should use. Also, how to set up you into on a vehicle. Information. I will introduce you to some of the tools that I use when I program eso, it can help you 40 schools to follow the steps I do, and any wouldn't start rush to in all necessary. Rushed to tools. 40 schools. There is quite a bit of set up, but after this section you will be done with that and will be able to focus 100% on Rusty. Note that some installation steps may be quite long, and it would depend mostly on your Internet connection speed as well as your computer performance. Don't worry, though. All the steps are quite easy to follow, and I will detail everything, so let's get started so you can quickly run Rusty 5. Which ROS2 Distribution to Use: Before we install ROS too, it's important to check which refers to distribution you need to use. And you can find a list of distributions on the website here, ducks that Ross.org or just search for Ross two distributions and you will easily find that page. So once you're here, you can see all available Ross two distributions in green, those who are currently supported, and in gray, those who are not supported anymore. And you can see that from now on, we will have one distribution, one new distribution every year, which should be released on May 23rd. And it's quite easy to know what is the other here. It simply follows the alphabetical order. So you can see here a, B, C, D, E, F, G, H, et cetera, et cetera. And so we're going to check two things to choose which version we want to use. The first thing is the date. Ell means end of life. So after this date, the distribution is not supported anymore. And so after the date you should probably not use this and it's best to upgrade to a new version. So you can see when the URL date is passed here, it's in grey or white. When the URL date, it's still valid, it's in green here. And the second thing to check is that, well, is division and LTS version or not. Okay. Lts means Long-Term Support and how to know which version is a longer-term support. Well, it's quite simple here. Foxy is a long-term support version, starts from 2020 to 2023. So we have three years and then every two years, so 2022, we have Ross to humble. This is an LTS version also, okay? And any LTS version starting from humble is going to be supported for five years. So the EOL date for humble is going to be May 2027. Can actually be this or something very similar. And you can see, for example, this Ross to Galactic is actually only support it for one year and a half. This is not an LTS version, okay? This is kind of transitioning version between two LTS. Okay, so 20, 20, 20, 22, and in 2024, 2026, etc. Those are the LTS versions. And now well, which version to use? Well, what I do and what I recommend you to do is to use the latest LTS version, provided that it's been released at least for a few months. So it is more stable and contains all the code packages you need. In this case, for now we will choose the rows to foxy Fitzroy. That's perfectly fine to start your learning journey. And then when you start to have a few Ross to projects and new LTS version is released, for example, that one, road to humble, you may test this new version to see if every functionality you need has been posted. And sometimes, well, you will need to wait because everything is not available at the beginning and you may still have some bugs. So what I do usually I wait between six months to a year before switching from one LTS version to another one. So we're going to use foxy for now and then well, around, let's say end of 2022 or beggining of 2023. Well, we are going to be able to switch to humble without any problem. And well, before we continue, one last thing to pay attention to is well, which operating system version you need for the RAAS to version you choose because each Ross to vision is linked to specific versions of Ubuntu, for example. So if you click on foxy Fitzroy and whether we can go down and you can see supported platforms, okay? So we have u into MacOS and Windows. You can see that for humans to the platform is actually the version is actually you will to 20.04. So if you want to use a Ross to foxy unit to use Ubunto 20.04. Okay, and for example, the version Ross to humble, which is going to be released in 2022, is going to target. You're going to 22.04 or something like that. So as you can see, if you change the version of ros to you also probably need to change your version of operating system. All right, and now that we know which version we're going to use here, which is Foxy. Let's continue and let's install this. 6. Install Ubuntu 20.04 on a Virtual Machine: For us to mainly works on three operating systems. You're going to Mac OS and Windows. Here you will install Ubuntu 20.04 if you don't already have it. Now that I will only use human to form these goods. That is the OS with which you will probably have less problems, would be set up, tools and everything else. So as you are just starting with Ross to I advise you maybe to use you're going to at least for the duration of this course. So if you already have human to 20.04 installed on your computer than grade, just go ahead and jump to the next lecture. If not, then you have two choices. You setup a dual boot, Are you create a virtual machine. Here? I won't explain how to create a Jewel boot because this is not the doubling of discourse and it's longer to look. So I will show you how to install a virtual machine. We've went to 20.04 on Windows. So let's get started. First. We will need to download an image of you been to 20.04. So just type. You went to download and you can find the latest version here, which is you would do 20.04. So you can just download it. And you will get to a thank you page. And it should stop yet. Just download the fire. If it doesn't start, you can click here. And as it is an open source projects, they will ask you if you want to donate. So holy, that appeal when it is downloading and now we have quite some time before it's finished depends on your internet speed mostly. And we will use VirtualBox or you type, you type VirtualBox on Google and you can go to the VirtualBox website. And we will download whatever is the latest virtual books. They're shown here. Okay? And you can find all the different OSC or Windows, MacOS, and Linux. So here we are on Windows or on any other quadratic system you train, you choose your operating system version. So I will click on Windows and save the file. And now you can weight that the VirtualBox download is finished. So once VirtualBox is downloaded, you can just execute it and installed it like any other software. So you can show the location path is in French, but it's not too hard to follow. You just type next, next. And here, yes, for the network. And then you can click on install. So once the installation of VirtualBox is finished, you can start it ok. And here you can see I already have three virtual machines, but for you it will be empty here, okay? So we will create a virtual machine on this VirtualBox software. And then once the, the ISO, which should be about 2.5 gigabyte is downloaded. We will be able to, but the ISO on the virtual machine to start it. So what we can do, what you can do waiting for the day you went to ISO is to create a new virtual machine. Let's name it. You're going to 2004, so the name doesn't matter, you just choose what you want, but it's better to have a meaningful name. And then you make sure that you have Linux and you're going to 64 bit here. Next, you will have to choose memory size around. It's ready quite low here. I recommend at least but two gigabytes. And I have quite a powerful computers. I will put eight gigabytes, 16, but for two or four gigabytes is good. You click on Next. You can create a virtual hard disk now. So just choose that option VI, which is, which is fine, dynamically allocated, which is fine too. And you will have to choose the size of your hard disk. So virtual hard disk will be created for your digital animation. You will have to choose a size. And the default here is ten gigabyte, it's quite low, is shown to install ROS and other programs. I suggest you put at least 20 or 25 gigabytes. Here. I will use 30 gigabytes. You can put much more if you want. Depends on the space you already have on your computer. And let's create the machine. So we have a new virtual machine. And we can do a few more settings because not everything is correctly set up yet. So you go in general, here we don't change anything. You're gonna system and system. You have the memory allocating before. And if you go on processor, you have the CPU allocation, okay? So that by default you have only one CPU. So that will make your virtual machine quite slow and you can add more CPU. So my gaze, I have and we put three CPUs. It really depends on your machine. You can put three or four. Just don't Bongo at the maximum. Okay. Because this is the maximum of my computer. No, we go in network. Because if you want to have internet on your virtual machine, you will have to use a bridged adapter and the Internet from your host. So for example, Windows will go through your virtual machine and you will have internet on your virtual machine. Otherwise you will not have internet. And let's say OK. Ok. So now your virtual machine is configured. While we need is the isoquant. It's just finished to them loud. Okay, so now you can go to setting again. Go on storage. And you have Controller IDE here, which is empty. So you click here and you click on that icon to choose the isoprene. I already have it here, but you can just navigate here and find the ISO that you'd just, well, yeah, okay, so I choose it from there. And I click on OK. And then you can just start your virtual machine. So they will ask you startup disk. So it's just what I did previously. Here. It's already selected because I've already selected it. If not, you will be asked to choose it. So you will put the isolette, you download it from Ubuntu website. And now the machine is starting. Okay, so you get to the installation step for you, but it may take some time to get there depending on your computer performance, okay? And here we will choose, we have to choose between try and install Ubuntu. We will choose directly installed y12. And if you are using a dual boot with maybe better to dry first and then installed. But as we are using, a virtual machine would just install on the virtual disk. We have. So you select Install and you choose your keyboard layout. As you may have guessed, is French. So choose any keyword which matches yours. Continue. We will choose the minimal installation. We don't need all the media player, utilities and gangland stuff. Okay, we will download updates and continued. You will be asked to choose if you want to Erase disk and install you want to or not. And you have a big warning saying this will delete everything. But actually we are using a new virtual hard disk that we just created inside the virtual machine. Urine murder, 30 gigabyte hard disk. So it's a new empty hardest. We have no problem erasing it because there is nothing and nothing on your computer will be erased. And you click on install now. And it's like a reminder of what will be installed. Let's continue. You choose a trivial times on Chu's name and computer name. We make mine. Like that. Choose a buzzword K, so you choose a password and you can choose to login automatically or not. I would choose that become simpler. And now you wait so you can wait a few minutes. And when you're installation is complete, you will be asked to rust out. So let's click on raced up now and just press enter. Okay? Okay, let's keep that. You can choose to send data. Okay? And you are going to 2004 is now installed. And before we continue, just a few more things to setup. So if you tried to go full screen, as you can see, when you change the size of the window in the virtual machine resolution will not change accordingly. So that is something we're going to fix right now. First we're going to open a terminal. So you can click on here and type terminal, and then you can open it right here. Also, right click here and add two favorite son. Now as you close the terminal, it's still here. Okay. So you're going to do sudo APT update first. You put your password that you just selected before. Okay? We're going to deal with those packages later. And now you're going to install. So we should do a PET installed, you're going to install those packages. Will essential. Gcc make pearl and dk MS. Okay. So you press yes. Okay, and now you can reboot your machine. So polar of the machine right here and you can read it. You can always start from the VirtualBox. Okay, now that your virtual machine has been reboot, you can go to here devices, insert, Guest Additions, city image. And you can click on around. Okay, as you can see, there is a city here, so but your buzzword. Okay, and when you get this message, you can actually press enter our emptying to quit the window and now you into restart again. Okay, and actually as you can see, it still doesn't work. Which can do is be jacked and insert it again. Okay? And I actually wrote again. Yeah, you may have to do this twice. And now if you try to do that, it works. So now you can go and finally eject the guests. Elision city. Ok. So you may have to do this operation twice. Mixture, you inject it, and then you click on exam Guest, Addition city and executes what's on the screen and then reboot. Now what you can do. So you can go on devices, shared clipboard and okay, I've already set it up, put it would be like this for you and you choose by direct channel. This will make sure that you can copy and paste between your host. So here my windows for your book and your virtual mission. And you may have to reboot also when you do that. And finally, you can open the Terminal. And we'll make an, a grade of every package we have. We've saw pseudo APT date, we've already done that, but they do APT grade. So from my case, I have 63 packages. May be different for you. All right. And now everything is set up and ready so you can install it was to make sure you reboot again. And now we're going to install Ross too. 7. Programming Tools I Use During This Course: in this video, I'm going to show you which tools in which I d. I usedto program. We've rushed to anyone to so I'm on Lee making the video. So you honored, stuck when I use a tool that you don't know, don't understand But anyway, you use any tool any idea you want It will already not matter for discos and for your us to experience. So that's a full I will, of course, use the telling on its turned out you into terminal and I will also use the what's called Terminator. So tell me NATO is kind off improved terminal where you can split can easily split the screen and have multiple terminals like that. For example, I can split easily in four. Any layout on I want and I have for different terminals. If you want to install a Terminator or you can simply type, it's still a pretty and still in Terminator you have been I breakages for you want to and you can find documentation on Google. You can easily find the Terminator keyboard shortcuts. What I used here is control shift. Oh, and control shipped it to split the terminal and you can Well, you can find the rest of the documentation on the Internet, so I will use sometimes the standard terminal sometimes Terminator. Now, to write code, I will use visuals to do code as a main idee. So visual studio code is free to use and I find it quite convenient to write a python and C plus plus code for us, too. We just show you my extensions. So I have only three extension here to keep it very minimal and simple. The C and C plus plus from Microsoft, the bison from Microsoft and also this image for because we will need to edit some Simic files. So we have the make long which support when we write the fine. And one thing you can do if you are using the S code, is to install to a pretty installed python three b i B. Which anyway, I think you will need one day or another. You can install that so it's already installed for me. You can install that because when you start editing some python file, you will be able to use the auto formatting and to use the order form a team you can price control shift and I and first time you do that, it will ask you to install a P I P package, actually toe install it for you. But you will need to have a wife and three p i. P. Okay. And lastly, I will use jet it so jaded when I simply need to edit a very simple text document when it's the most basic text eight or you're right text you say even you close to find that it. So that's my main set up. I hope this will help you navigating the course. And just as a conclusion, you juice whatever you want. The point here to learn Rose to with the tools that you are more family we've 8. Install ROS2 Foxy Fitzroy on Ubuntu 20.04: All right. You know, have you been to 20 for installed on your computer and whether it's a dual boot I virtual machine, all the following instructions will work the same. So let's install ROS to foxy. You can just type in store Ross to foxy on Google. And you will get to that page here on docs dot Microsoft.org. You can easily find that page. And we're going to choose binary packages for human to hear. You been to 20.04 with Debian packages. So you click on that and then you can scroll down and you have all the instructions. So I'm going to show you what you need to do from that. And also add a few stuff that's going to help us in the following of the course. So first of all, you can just do locate here. You will need to set locale and check that you have UTF eight if you don't have that. Well, here I have it, but I'm still going to do all the other steps. So you just do that one by one, okay? Second step, and then that one. Okay? And then export with UTF-8. And then if you do local, again, this is what you should get. All right. Now we're going to set up the sources. So to set up the sources, we're first going to do this line here. Okay? That's going to install a few packages. Right? We do this curl command. And then we're going to add the repository to the sources list here because we need a new repository for us too. So press Enter for that. And well, we are not going to use this command because you can see it's for Linux Mint. All right, so if you have Linux Mint, maybe you can do this, but here we are on, you're going to end so we don't use that one. So after you have set up the sushis with the three commands here, you're going to do sudo APT update. Okay? And you can see here that when we update, we have our Were you going to sauces him but we also have packages dot js.org slash Ross to slash Ubunto orchestral. We have new sources from which we can know get Rostow and install ROS too. Okay, So if you see this, that's great. And then we're going to install ROS to disconnect APT install Ross foxy desktop. You can see that you also have the rows based installed with the bare bones with cheese, foxy dash, dash bays instead of desktop. So what is the difference between this and this? Well, basically this is, so this is the base, like it says, it's the base with just what you need to run Ross and with the minimal setup. So the communication libraries, the message, the common line tools, everything. But you don't have any graphical tools. If you install desktop, you have Ross base plus everything graphic also, for example, RVs. And then you have some demos, some tutorials, many more packages that we are going to need to use in the course, and also that you are going to need to use later. So that's the one we're going to use. And you can just copy these in a terminal. In here will be prepared because you will have a lot, a lot of packages, okay? So you can see is going to download more than 400 megabytes and it's going to install more than 2.5 gigabytes of additional disk space. So that's pretty big. And so you can just put y for yes, press Enter, and then, well, you can wait a few minutes until everything is done nowadays. Everything is installed. Alright, and now everything has been installed. So we have Ross foxy desktop and all the packages that it contains which is installed on your machine. Just a quick note here is that you can see that for example, you have packaged like that, a package, a package like that. And the similarity with every package that is going to start with rust dash, foxy dash, something. So if you want to install any other rows to package for Ross foxy, then you are going to write Raoult's dashed foxy dash and the name of the package. And so you can install in a room of any package like that for rows 2. So that's very simple. And now what I'm going to add something that is not here, the installation page. We are going to add a Python module which is complete so that when you use later in the course ross to command line tools, you will be able to use the auto-completion. Okay, Let's do clear. I'm going first to make sure you have PIP3. If you have this PIP3 not found, then you just do sudo APT install python3 dash PIP for you install that. Yes. And then let's do clear again, you are going to PIP3 Install, Complete. Like this. It's going to download it, install it. And what? This is good. So now everything is going to work correctly. And well, that's pretty much it for the installation. So you have more stuff here, but we care about that. And then we'll, if you ever want to uninstall rose to whether you have the command to do that here. Okay, So you can just install with one command. And now what we can do is do rabbits. So it's very important we have installed many packages and also the AG completed not going to work if we don't have robots. So we can do sudo robots to reboot the machine and make sure that you watch next lesson so we can set up the environment forest. 9. Setup Your Environment for ROS2: Okay, now refers to is installed, but to actually use it, you will need to source one setup scraped from the global Ross to installation folder. So what am I talking about here? If you go to slash OPT slash ross, OK, this is where you will have all your rows and rows, two distributions installed. You go to foxy, which is what we just installed now. And here you have setup the bash. You need to source that script here. And once you have solved that script, you can use Ross to in these terminal in this session. If you don't save that script, you will not be able to use Ross to when you will get an error. Ok, so if I open a new terminal, I will still need to let Sam here. I will still need to source slash poverty or OS foxy setup that Bash. And we need to Sue's that script in order to use cross two every time you open a new terminal. So one thing we can do, because it's quite annoying too, always solve discrete when we open a terminal, is to add that to our bash ESI, which is right here in our home directory. So you can use gedit to append the rash assay. And at the end of the Bash assay, right at the end, you can add a new line. And that line would be source setup, done bash. Ok. You can save your Bush messy. Close it. And when you open a new terminal, whether it's a new window or anything, you're gonna musician. Your bash assay will be sourced. And it will also source the setup dot Bash script from the global Horos to installation folder. So this step is actually very, very important. If you don't do that, you won't be able to use across two. 10. Launch a ROS2 Program!: after all these installation process led Simply launch your first rose to program. For that we won't right Any code? We just use existing examples that were downloaded during the installation. So just type what I type and it's just a preview off what we will do next. It's OK if you don't understand everything. Their point is just to get something walking quick so you can type rice too on space and then press tab twice. Okay, you first Awful. If you don't get that, it means that the rose to installation may not be complete are you may not have sourced the environment and put that in your bush s e So if you don't get that, make sure you followed the previous lecture and made every stick No, let's run our program. So we will do rust to Iran. We will select d move nodes CVP in Dhaka. So we are launching the talker program from the day more notes see PP by cage And as you can see, we have a log talker is publishing Hello world We've a counter and now in another terminal which is also sourced because the bush Jesse was executed with that line we can use Rose to ran. Um, they moved note sapping and least now and listener. So this program in this program are linked, Of course. And the listener will listen. Toe the tanker. Andhra Sprint. What gets so you can see here? We just brings the messages that were published by this program here. If I killed so you can kill a program by using control, See? Okay. And as we can see here, no new message. If I started again, we have the messages from detox. Great. So you have launched your first rusty program on. But the point of this lecture is that you can check if you're Rose to installation is correctly working. If you have that, it means, yes, it's working. And now you will be able to go to the following and actually write your arm rose to programs 11. Write Your First ROS2 Program: All right, Russ, to ease. No installed in, configured before you underlayment. Now, in the next few lessons, you would write and run your own rush to programs. All note, I would explain what is a rush to note, and then you would directly create one to set up. And, you know, do you will first create a roasting workspace in your home directory. Then you will create a package inside this workspace, and you were right. The node inside of black age. Set the note up, combine it and run it. As you can see, lectures are duplicated for bison N C plus plus. I start with Python then and do the same thing with C++ so you can learn with both languages and see the similarities and differences between a python rose to program and this SEPA space for us to problem, even if you want to learn rush to with only one language. I ready and courageous to at least watch lectures for the other language. And at the end of this section on nodes, you will be able to download the complete workspace we've owned code for both languages. Now go to the next lesson to create your US to work space 12. Install the ROS2 Build Tool - colcon: To create your own Ross to programs, you will need a build tool Specific to Ross to. So these build tool is called conquer and was specifically created for us too. So let's install it. Now. You can install, we've pseudo APT install Python three, coke on common extensions. Okay, so you install that. Great. So cocoa is now installed and you can use it. I will not go into too much details right now, but you will just see how to use it very soon. And along this course I will explain it a little bit more. And actually there is one more thing we need to set up with Qualcomm, which is the autocompletion feature, which is not enabled by default. So we would need to do that. You can go to Follow me. Their user share called cone are complete and hook. Okay, here you have a bash script, call con are completely bash and you will need to Sue's, that's great. In this terminal in order to use the Add complete focal cone in this terminal. So again, you can do that every time you need to use a complete with Coke on. Or you can also just go to your bash SE and add this line. Okay? Alright, lets add it right here. So what are we going to do? Source, and then I'm going to copy the path here. And then I'm going to copy the script and slash, OK and save the bushfires. So these first-line, very important, if you don't do that, you won't be able to use Ross throughout all. These line is less important. It's just when you use cold gone to build your packages, which we'll see later. It will allow you to use the autocompletion features. 13. Create a ROS2 Workspace: In this lecture, you will see how to create and setup a arose to workspace. This workspace will be the place where you write all your code for a roster application. And that's also where you will compile this code. So let's create a workspace. First. Let's go to the home directory and I will create a folder named Ross to an oscar WAS four workspace. You can name this workspace folder as you want. This is just a convention that you will often see in the earth to community, which is domain, your workspace for us to Ws. Inside this folder, we're going to create a SRC folder, which is source folder. Okay, so we have that, which is our workspace and all the code and packages that we are going to create in the following will be in the source folder of that workspace. So now if you go to the roster workspace directory, you can do Qualcomm revealed to actually build your workspace. And we've just installed Qualcomm before. So if you get an error here, make sure you've watched the previous videos. And as you can see, we have a successful and build them. And of course, we have 0 package because we didn't put anything in the source directory. If I check what's inside. Now, as you can see, we have three more folders, which contains log of the build process, and then a bill folder and install folder. If you go to this install folder, here, again, we have a setup dot Bash script. We also have a local setup dot bash script. Okay, so guess what we will have to do? Well, we will have to source that script on that one. So here for example, I'm going to solve the local setup dot dash. And which means that now I can use whatever I've crea