Intro: Install and Setup ROS2 Humble - ROS2 Tutorial 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone welcome to this tutorial series crash course on ros2 if you have never used robot operating system before even roswell or if you want a practical and quick refresher of the basics this series is for you and very quickly so you don't get confused ross means robot operating system ros1 is the first version of ros and ros2 is the second version of ross ross 2 is now stable enough to be used so this is the recommended way to start with ross in this series i will sometimes use the term ross or ros 2 and when i do i will be talking about the same thing so the goal of this crash course is simply to get you started with roster in a very short amount of time you will learn how to install and set up everything how to use the main roster concepts with the command line interface and tools and you will also write your own roster programs with python in fact throughout the series we will do together a small but complete roster application using a 2d simulation of a robot i have designed the series so that you can really get a better understanding of the global picture and also get some practical knowledge that will be useful for your next steps with ros 2. in this tutorial series i will target the rost2 humble distribution but the concepts and most of the code will also work for other roster distributions now there are some prerequisites you need in order to use ros basically you have to be familiar with ubuntu and the linux command line and to write a ros code you will also need to know a bit of python and c but here we will stick to python so just python will be fine now this crash course is great to get you started and if you want to go further and dive into more details concepts projects and c plus plus code i have also a much bigger and complete course on ros 2. so if you are interested i've put a link in the video description below and i will talk a bit more about this later on now let's get started with the series in this first episode we are going to install and set up ross to humble on ubuntu 22.04 so that in the next episode you can start using ros functionalities here i am going to start from ubuntu 22.04 that i have already installed on a virtual machine in virtualbox you can use either ubuntu installed with a dual boot on your computer or in a virtual machine it's up to you so to install rost2 let's first open a terminal and i'm going to put this on the side and let's also open a web browser i'm going to open firefox here okay and let's also put this on this side and let's search for ros to humble okay you will get to so let's zoom a bit here you will get to this page on docs.ros.org okay make sure you have a humble in the url if you don't have maybe you are reading the documentation for another version so let's click on humble here and then here you can see the table of contents and you're gonna choose installation and click on install humble all right now you're gonna choose the binary packages installation not building from source and you're gonna go here with ubuntu and debian packages and now we have the instructions to install ros2 on ubuntu so i'm going to follow here just the instructions that we need and just a quick note is that maybe when you browse this documentation the instructions will have changed a tiny bit but that's okay it's just because well the documentation is quite frequently updated so if you see something that is just a little bit different no worries just follow the instructions and everything will be okay so the first thing is we need to make sure that we have utf-8 so we're going to type local in the terminal here and make sure that we have utf-8 so here it's good if you don't have it then you're gonna well just run those commands but your passwords okay so that's gonna install some stuff it's already installed for me you run those lines here actually let's put this like that all right so you run the four lines and then let's check local again and of course it's okay you have utf-8 now you will need to set up the sources because you can't just install ros2 like that you will need to set up the sources so that your computer here can find where to download roster and well those instructions here may be removed in the future or maybe modified so if you don't see that don't worry just go to the next step but what you can do is just do this apt cache policy grip universe and if you see stuff like that with 500 and then well you see jammy and universe stuff then that's okay you don't necessarily have to have the exact same thing with for example us here you can see i have fr but the important thing is that you see 500 and universe so if you don't have those you can run those two commands here i'm not gonna run those but you can run there if you don't have the correct lines and now it's really the step to actually set up the sources so you're gonna run this line first to install curl and different functionalities so here actually i already installed it before so nothing to do for me then you run this line okay and add the repository to the sources so you just copy and paste the line and then you are good what you can do is now do an update so pseudo apt update this is going to update and you can see that you should have something like that packages.ross.org with ros2 so you will have something similar and one important thing is that before you install rost2 let's do sudo apt upgrade to upgrade all the packages we have okay so you may have a lot or not it depends when was the last time you actually upgraded your system so i'm just going to put yes and wait for the upgrade okay and now you can go down into the instructions so you have a warning here but nothing to worry about if you have correctly updated and upgraded the packages so now everything is up to date on the system now you can install rastu so here you have two choices you can install roster with this ros humble desktop or ros humble dash ros dash base so browse base is actually sort of you can see the bare bows just the communication the command line tools you don't have any graphical tools and utilities this is what you would want to have in a limited system for example on a raspberry pi or if you have a computer with very low resources or if you don't have a graphical interface for example but here what we want is to have the base plates also all the utilities some demos some tutorials and some graphical tools so we're gonna install this so you just do sudo apt install rush handle desktop you press enter and here well i've already installed it before for this tutorial but you will see a lot of packages so maybe you will have a few hundreds of packages for a few hundreds of megabytes to download and your few giga to be added to your hard drive okay so that's gonna be a lot so you press yes and then you can wait for a few minutes it's gonna depend of course on your internet connection speed and the performance of your computer and right once you have successfully installed this then ros2 is installed and just a quick note here is that if you want to install any rost2 package in the future well this is very simple because all the rows to package for the humble distribution for example will be ros humble dash something so you will just need to run this command sudo apt install ros humble dash the name of the package so this is quite easy now well ros is installed but we can't just use it like this we need to set up the environment okay because so let's clear this if i just do rust2 you will see that rost2 command not found so to be able to run rost2 first you need to install it which is done and then you need to source a setup script here in every session or every terminal where you want to use roster and so if we go to slash opt you will see that this is where ros is installed you can go to slash so opt slash ros and then you will see handle this is the distribution we just installed so for us humble is actually rush to humble okay and here you see we have a setup.bash script and this is the script that we need to source here okay we need to source that so let's go back to home directory and let's just source this script and now that this is sourced look at that if i do rush to now so we have the help actually of the command we don't have rows to command not found we have the help of the command okay which means that this has been found and rost2 is correctly installed and set up now the thing is let's say open new terminal and i do rush too once again i have the same problem so i need to set up the environment and now it works okay so i will need to set up the environment for each terminal i use or if you connect with ssh for example you will need to set up the environment for each ssh session and so that's not really convenient all right so what we're going to do instead is we're going to add this line to the bash rc file in our profile here for the user so that this line is going to be executed every time we open a new terminal or session okay so to do that we are going to use jedit and then you can do bash see so tilde to go to your home directory slash dot assi so this is a hidden file press enter and you can see we have already a lot of lines and all this stuff is going to be executed when you open a new session or a new terminal so you go to the very end of the file and let's add a new line here and what do we put we put just this one okay source slash property slash ross slash humble slash setup dot bash let's save the file let's quit and let's just quit all the terminals that we have let's open a new terminal and when you open the terminal this line will be executed because it's in the bash ac now i can do rows too and you can see now it is working so when you have rows to with usage rows to and the help of the command it means that ros 2 is correctly installed and configured and congratulations you are now ready to start using rost2 alright that's the end of this episode if you found it useful you will definitely like my full course on ras2 for beginners this course contains more than 10 hours of content and will teach you everything you need to create complete roster applications you can find the link in the description thank you for watching see you in the course all in the next tutorial of the series
Info
Channel: Robotics Back-End
Views: 109,009
Rating: undefined out of 5
Keywords: install ros2, install ros2 humble, install ros2 h, ros2, ros2 course, ros2 tutorial, ros2 humble, robotics back-end
Id: 0aPbWsyENA8
Channel Id: undefined
Length: 11min 58sec (718 seconds)
Published: Mon Aug 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.