WEBVTT

00:00.680 --> 00:06.620
In this lesson, I will guide you step by step in setting up the development environment.

00:06.650 --> 00:14.150
This is a fundamental step as using a good code editor that has properly been configured for our needs

00:14.180 --> 00:21.800
not only helps us to develop our code faster, but also to detect the errors in advance and also provide

00:21.800 --> 00:24.260
guidance on how to resolve them.

00:24.560 --> 00:31.490
During this course, I will be using Visual Studio Code to develop the code, and you will soon understand

00:31.490 --> 00:36.080
why this is the best choice for developing applications with Ros2.

00:36.110 --> 00:42.470
There are in fact, countless plugins that you can install in order to configure and customize your

00:42.470 --> 00:45.980
development environment, offering various functionalities.

00:45.980 --> 00:52.220
So let's start to install Visual Studio Code by opening the Ubuntu App Center.

00:52.220 --> 00:55.430
So this one here that you find on your ubuntu installation.

00:55.430 --> 00:58.070
And let's just look for code.

00:58.340 --> 00:59.930
And here we can see it.

00:59.930 --> 01:03.690
So let's open and let's install Visual Studio Code.

01:05.580 --> 01:06.300
Perfect.

01:06.300 --> 01:10.710
So now it is installing Visual Studio code on our ubuntu machine.

01:23.340 --> 01:27.330
Once the installation is completed, we can finally open Visual Studio Code.

01:27.930 --> 01:29.370
So here we go.

01:29.520 --> 01:37.320
And now, apart from selecting the team that you prefer, we can install some extensions that are going

01:37.320 --> 01:40.290
to help us during the development of the code.

01:40.320 --> 01:45.420
So the first one that we are going to need is the C plus plus extension.

01:45.450 --> 01:50.850
So this one here and also we are going to need this one here.

01:50.850 --> 01:53.070
So the extension pack.

01:55.470 --> 02:01.490
Then we also are going to need the CMake Extension.

02:01.490 --> 02:07.220
So as you can see, this is already being installed because we have installed the C plus plus extension.

02:07.220 --> 02:11.540
Then let's also have the Python one.

02:12.170 --> 02:12.920
Perfect.

02:12.920 --> 02:14.960
So this one here is enough.

02:16.040 --> 02:21.260
And then we can also install the XML extension.

02:21.890 --> 02:30.470
So this one here and also the XML tools is very useful because it will auto compile some XML files.

02:33.530 --> 02:40.700
And then finally another very useful extension, and probably the one that makes Visual Studio Code

02:40.700 --> 02:48.140
the best code editor for working with Ros is the Ros extension directly developed by Microsoft.

02:48.140 --> 02:49.880
So let's install it.

02:53.900 --> 02:54.740
Perfect.

02:54.740 --> 02:57.410
So now we have all our extensions.

02:57.410 --> 03:01.550
So all the extensions that we need, we have all of them installed in our PC.

03:01.590 --> 03:08.100
and soon you are going to see how all of these extensions are going to help us when we develop the code.

03:08.310 --> 03:14.400
So with this, the configuration of Visual Studio Code is completed, and during the course we will

03:14.400 --> 03:20.880
see how to use and how to take advantage of the features offered by all of the extensions that we have

03:20.880 --> 03:26.880
downloaded in order to develop our application faster, with fewer errors and with more ease.

03:26.910 --> 03:32.670
Now, after installing and configuring Visual Studio Code, since we will be using the Linux terminal

03:32.670 --> 03:39.300
quite extensively during this course, I recommend you installing a more advanced version of the normal

03:39.330 --> 03:42.420
ubuntu terminal that is called Terminator.

03:42.450 --> 03:48.450
So actually you can see that this one here is Terminator that I'm going to use along the course.

03:48.450 --> 03:55.860
And instead here you have that this one is the normal standard ubuntu terminal.

03:55.860 --> 03:59.100
So in order to install this one so that is terminator.

03:59.100 --> 04:08.150
And to use this one you can use the command sudo apt get install terminator.

04:09.680 --> 04:11.720
So in my case.

04:14.750 --> 04:15.410
Perfect.

04:15.440 --> 04:19.970
In my case, I already have this package, so it's already at the newest version.

04:19.970 --> 04:20.660
Perfect.

04:20.660 --> 04:26.960
And so we are going to use this terminal because it offers some functionalities like for example the

04:26.960 --> 04:31.070
possibility to open a terminal in the same window.

04:31.070 --> 04:33.680
So here these are two different terminals.

04:33.680 --> 04:37.520
And I can also open terminals as I prefer.

04:37.520 --> 04:43.070
So for example with Ctrl shift E I can open another terminal on this side.

04:43.070 --> 04:47.990
And with Ctrl shift O I can open another terminal at the bottom.

04:47.990 --> 04:53.090
Also I can press Ctrl shift W in order to close one terminal.

04:53.090 --> 04:59.540
Or also I can press Ctrl shift X to make one section of the terminal bigger.

04:59.540 --> 05:06.690
And now in order to go back again, Ctrl shift X and we are back to the original configuration.

05:06.720 --> 05:07.410
Perfect.

05:07.410 --> 05:11.970
So these are just a few tips in order to get started with Terminator.

05:12.000 --> 05:15.120
Now actually let's close all of these.

05:15.120 --> 05:23.220
Let's just use one single terminal in order to proceed with the installation of some Ros2 packages that

05:23.220 --> 05:25.380
we are going to use during this course.

05:25.380 --> 05:33.300
To install any Ros2 package that is available in open source, we can just use the command sudo apt

05:33.330 --> 05:39.960
get install followed by ros, then the ros2 version that you are using.

05:39.960 --> 05:46.920
So in my case, as I am on ubuntu 24, this is Jesse and now this is followed.

05:46.920 --> 05:51.060
So this command is followed by the name of the package that you want to install.

05:51.060 --> 05:58.500
So let's start by installing a package that is called Joint State Publisher gooey.

05:58.530 --> 05:59.280
So perfect.

05:59.280 --> 06:00.060
This one.

06:02.090 --> 06:04.010
And you are going to use this package.

06:04.010 --> 06:06.860
So as the name says, this offers a GUI.

06:06.860 --> 06:12.470
So a graphical user interface that will enable us to interact with the joints of our robot.

06:12.500 --> 06:18.470
Then still with the same command, let's also install the exact package.

06:18.770 --> 06:21.680
And then let's also install the gazebo package.

06:21.680 --> 06:25.520
So with Ros Jesse Ros gazebo.

06:25.520 --> 06:26.630
So gz.

06:26.630 --> 06:30.530
And let's install all the packages with this name here.

06:30.530 --> 06:32.270
So let's press enter.

06:32.600 --> 06:36.980
And so as you can see here I already have on my PC all these packages here.

06:36.980 --> 06:38.960
And if you don't it will.

06:38.960 --> 06:45.050
So this command here will install for you all these packages here that are used in order to start the

06:45.050 --> 06:46.790
Ros gazebo simulation.

06:46.790 --> 06:52.280
So this is a simulated environment that you are going to use intensively during the course to simulate

06:52.310 --> 06:53.270
our robot.

06:53.300 --> 06:55.430
Then let's also install another package.

06:55.430 --> 06:59.930
And this is called the Ros two control package.

06:59.930 --> 07:05.470
So let's press enter and this package here instead implements the control system of our robot.

07:05.470 --> 07:10.570
So basically the software that will allow us to move the joints of our robot.

07:10.630 --> 07:14.710
Also let's install the Ros two controllers.

07:14.710 --> 07:17.920
So with the final s perfect.

07:17.920 --> 07:22.480
And finally we need also to install a plugin for gazebo.

07:22.480 --> 07:25.720
So for this software here that we have just installed.

07:25.720 --> 07:29.830
So a plugin that will allow us to use this library here.

07:29.830 --> 07:33.490
So the Ros two control library within the simulated environment.

07:33.490 --> 07:35.860
So again we can use the Ros Jesse.

07:36.460 --> 07:42.250
And then let's install the gazebo Ros two control plugin again.

07:42.250 --> 07:44.560
Also in this case let's install all of them.

07:45.310 --> 07:46.000
Perfect.

07:46.000 --> 07:47.590
So let's type yes.

07:54.670 --> 07:57.880
Okay let's install one last Ros two library.

07:57.880 --> 08:00.310
And this is called move it.

08:00.310 --> 08:07.070
And also in this case let's install move it with all the packages that are here within this name here.

08:07.070 --> 08:08.570
So let's press enter.

08:08.570 --> 08:14.420
And this will actually install a lot of packages that I have already installed in my PC and this software

08:14.420 --> 08:14.780
here.

08:14.780 --> 08:21.380
So move it is an open source software that will allow us, for example, to plan movements for our robot.

08:21.380 --> 08:25.730
And so to, for example, to move it our arm from one place to another.

08:25.730 --> 08:31.010
It will also allow us to calculate the kinematic and the inverse kinematics of the robot.

08:31.010 --> 08:33.830
And in general it contains a lot of packages.

08:33.830 --> 08:39.680
So a lot of software that is very useful and that is very common for manipulator robots.

08:39.740 --> 08:42.470
Let's install also another library this time.

08:42.470 --> 08:45.710
This is not a Ros package but is a Linux package.

08:45.710 --> 08:50.330
And let's install it with sudo apt get install.

08:50.330 --> 08:55.310
And the library that we want to install is the lib serial dev.

08:55.310 --> 08:56.720
So let's press enter.

08:56.720 --> 08:58.790
And actually we are going to use this library.

08:58.790 --> 09:06.540
So the lib serial in order to communicate using the serial port with the Arduino device that will control

09:06.540 --> 09:07.830
the robot movements.

09:07.860 --> 09:14.520
Then let's also install some Python packages, starting with the Python package manager called pip.

09:14.580 --> 09:22.920
So with sudo apt get install and let's install Python three pip.

09:23.070 --> 09:23.910
Perfect.

09:23.910 --> 09:27.540
And then still using pip we can install some Python packages.

09:27.540 --> 09:32.340
So some packages that we are going to need only for the Python nodes.

09:32.340 --> 09:36.030
And so let's use the pip install.

09:37.890 --> 09:40.440
Let's start with the Pyserial package.

09:40.470 --> 09:44.610
And so this library here basically is the same as this one here.

09:44.610 --> 09:46.800
So this one is for the C plus plus.

09:46.800 --> 09:52.140
So we're going to use the lib serial for the C plus plus node to communicate with the Arduino node.

09:52.140 --> 09:58.170
And the Pyserial instead will be used to communicate with the Arduino board from a Python node.

09:58.170 --> 10:03.090
So let's install it and let's use the brick system.

10:03.890 --> 10:06.590
packages flag perfect.

10:06.590 --> 10:07.940
So we have the pyserial.

10:07.940 --> 10:10.460
Then let's also install with the same command.

10:10.460 --> 10:14.750
So still using pip let's install the flask library.

10:14.750 --> 10:16.220
So let's press enter.

10:16.220 --> 10:17.210
And this library.

10:17.210 --> 10:20.990
So we are going to use the flask library in order to communicate.

10:20.990 --> 10:24.380
So in order to create a web server running on our PC.

10:24.380 --> 10:29.420
So running on our robot that will be able to communicate with the Alexa API.

10:29.450 --> 10:32.990
So that will receive actually the commands from Alexa.

10:33.020 --> 10:44.690
Then still for the communication with Alexa, let's also install the flask ask SDK and also the ask

10:44.720 --> 10:45.620
SDK.

10:45.620 --> 10:47.300
So let's press enter.

10:47.300 --> 10:49.310
And so we are going to use these three packages.

10:49.310 --> 10:55.130
So the flask the flask ask SDK and also the ask SDK.

10:55.130 --> 10:58.700
So we're going to use the three of them in order to communicate.

10:58.700 --> 11:02.750
So in order to interface our robot with the Alexa voice assistant.
