If you decide to install ubuntu 22 on your PC, we can proceed to the installation of the version amble
over Austria during this course.
In fact, you can decide which version of Ros2 to use depending on the ubuntu version.
If you are using ubuntu 22, then you need to install the version that is called Amble of Ros2.
Otherwise, if you prefer using ubuntu 24 then you will need to install the version jazzy of Ros2.
Either way, the code that we will be developing during this course is compatible with both of them.
In this lesson, I'm going to install the version amble of Ros2 as now I am on ubuntu 22.
And also you can find all the commands that I'm going to use in this lesson in a PDF attached to this
lesson.
The installation procedure of Ros2 is very simple, and you simply need to copy paste all the commands
that you can find here at this link that you can also find in the resources of this lesson.
So here actually all of these are the commands that we need to use.
So let's open a new terminal.
Let's place it on this side.
And now let's start copy pasting simply all the commands that we have here.
So let's start with the setting of the local.
So let's copy this command here.
Actually we can ignore the first one as this one only checks for the UTF eight.
Now let's also copy this second command.
Perfect.
And so let's continue like this.
So let's copy also this command.
And also the last one for this section.
Perfect.
Now let's move on to the next section.
That instead is about setting up the sources.
So let's start with the first command.
As always let's paste it.
Then the second command.
Perfect.
So let's press enter.
Now let's move on to the installation of Carl.
So let's copy this one and let's paste it.
Okay.
And now we can use Carl.
So this one here in order to download and set the Ros2 keys.
Perfect.
So we are here so we can copy also this command here.
And we can paste it.
And so now we have set up everything.
So we are ready to install finally the Ros2 packages.
So first we need to update our system.
So let's update it.
Then we also need to upgrade it.
So let's take this one and let's paste it.
Perfect.
And now we can finally install Ros2 humble.
So here we can install the recommended version that is the desktop version that already contains some
very useful packages, such as, for example, RVs.
It contains also some demos and some tutorials that we are going to use during this course.
So let's copy this command and let's paste it.
So this will install a lot of packages as you can see.
So let's wait for the installation of Ros2 to complete.
Once the installation of Ros2 the Humble Desktop version.
So this one here is completed, we can move on to install also this one here.
So this is very important.
So let's copy this command here and let's paste it.
As with this command we are installing the Ros developer tools.
So this one here.
And as we are becoming Ros developers we are going to need many of the tools that are here within this
package.
Perfect.
And as the last step we can see here for the installation is the environmental setup.
So actually we need to set up our Ros2 installation.
So as you can see here our Ros2 is being installed within this directory here.
So in opt Ros amber.
And so actually we can just copy this command here.
And in order to automatically source the Ros2 installation, every time we open a new terminal, we
can insert this line here within a file that is called bash RC.
So if in fact we get the list of all the files that are now in the home directory, we can see that
it exists a file that is called bash RC.
So let's modify this file for example with nano.
So let's modify it the bash RC.
And actually we can go at the end of this file.
Perfect.
So here we just need to paste this command here.
So the one that we have just copied.
So now let's press Ctrl o in order to save these changes.
So let's press enter and then Ctrl X simply in order to exit.
Perfect.
So now if we open a new terminal we should be able to use the Ros2 command.
And so if we use for example the flag minus L perfect.
So now we have the confirmation that actually the ros2 is correctly installed in our PC.
And also we can see that this command here returned a very long list of commands.
So all of these are ros2 commands.
So as you can see here.
And don't worry if for the moment you don't know this command yet or you don't understand the output
of this command, as we are going to use many of these commands here.
So we are going to use many of these ros2 tools in the following reasons Rthy.