In this lesson, I will guide you step by step in setting up the development environment.
This is a fundamental step as using a good code editor that has properly been configured for our needs
not only helps us to develop our code faster, but also to detect the errors in advance and also provide
guidance on how to resolve them.
During this course, I will be using Visual Studio Code to develop the code, and you will soon understand
why this is the best choice for developing applications with Ros2.
There are in fact, countless plugins that you can install in order to configure and customize your
development environment, offering various functionalities.
So let's start to install Visual Studio Code by opening the Ubuntu App Center.
So this one here that you find on your ubuntu installation.
And let's just look for code.
And here we can see it.
So let's open and let's install Visual Studio Code.
Perfect.
So now it is installing Visual Studio code on our ubuntu machine.
Once the installation is completed, we can finally open Visual Studio Code.
So here we go.
And now, apart from selecting the team that you prefer, we can install some extensions that are going
to help us during the development of the code.
So the first one that we are going to need is the C plus plus extension.
So this one here and also we are going to need this one here.
So the extension pack.
Then we also are going to need the CMake Extension.
So as you can see, this is already being installed because we have installed the C plus plus extension.
Then let's also have the Python one.
Perfect.
So this one here is enough.
And then we can also install the XML extension.
So this one here and also the XML tools is very useful because it will auto compile some XML files.
And then finally another very useful extension, and probably the one that makes Visual Studio Code
the best code editor for working with Ros is the Ros extension directly developed by Microsoft.
So let's install it.
Perfect.
So now we have all our extensions.
So all the extensions that we need, we have all of them installed in our PC.
and soon you are going to see how all of these extensions are going to help us when we develop the code.
So with this, the configuration of Visual Studio Code is completed, and during the course we will
see how to use and how to take advantage of the features offered by all of the extensions that we have
downloaded in order to develop our application faster, with fewer errors and with more ease.
Now, after installing and configuring Visual Studio Code, since we will be using the Linux terminal
quite extensively during this course, I recommend you installing a more advanced version of the normal
ubuntu terminal that is called Terminator.
So actually you can see that this one here is Terminator that I'm going to use along the course.
And instead here you have that this one is the normal standard ubuntu terminal.
So in order to install this one so that is terminator.
And to use this one you can use the command sudo apt get install terminator.
So in my case.
Perfect.
In my case, I already have this package, so it's already at the newest version.
Perfect.
And so we are going to use this terminal because it offers some functionalities like for example the
possibility to open a terminal in the same window.
So here these are two different terminals.
And I can also open terminals as I prefer.
So for example with Ctrl shift E I can open another terminal on this side.
And with Ctrl shift O I can open another terminal at the bottom.
Also I can press Ctrl shift W in order to close one terminal.
Or also I can press Ctrl shift X to make one section of the terminal bigger.
And now in order to go back again, Ctrl shift X and we are back to the original configuration.
Perfect.
So these are just a few tips in order to get started with Terminator.
Now actually let's close all of these.
Let's just use one single terminal in order to proceed with the installation of some Ros2 packages that
we are going to use during this course.
To install any Ros2 package that is available in open source, we can just use the command sudo apt
get install followed by ros, then the ros2 version that you are using.
So in my case, as I am on ubuntu 24, this is Jesse and now this is followed.
So this command is followed by the name of the package that you want to install.
So let's start by installing a package that is called Joint State Publisher gooey.
So perfect.
This one.
And you are going to use this package.
So as the name says, this offers a GUI.
So a graphical user interface that will enable us to interact with the joints of our robot.
Then still with the same command, let's also install the exact package.
And then let's also install the gazebo package.
So with Ros Jesse Ros gazebo.
So gz.
And let's install all the packages with this name here.
So let's press enter.
And so as you can see here I already have on my PC all these packages here.
And if you don't it will.
So this command here will install for you all these packages here that are used in order to start the
Ros gazebo simulation.
So this is a simulated environment that you are going to use intensively during the course to simulate
our robot.
Then let's also install another package.
And this is called the Ros two control package.
So let's press enter and this package here instead implements the control system of our robot.
So basically the software that will allow us to move the joints of our robot.
Also let's install the Ros two controllers.
So with the final s perfect.
And finally we need also to install a plugin for gazebo.
So for this software here that we have just installed.
So a plugin that will allow us to use this library here.
So the Ros two control library within the simulated environment.
So again we can use the Ros Jesse.
And then let's install the gazebo Ros two control plugin again.
Also in this case let's install all of them.
Perfect.
So let's type yes.
Okay let's install one last Ros two library.
And this is called move it.
And also in this case let's install move it with all the packages that are here within this name here.
So let's press enter.
And this will actually install a lot of packages that I have already installed in my PC and this software
here.
So move it is an open source software that will allow us, for example, to plan movements for our robot.
And so to, for example, to move it our arm from one place to another.
It will also allow us to calculate the kinematic and the inverse kinematics of the robot.
And in general it contains a lot of packages.
So a lot of software that is very useful and that is very common for manipulator robots.
Let's install also another library this time.
This is not a Ros package but is a Linux package.
And let's install it with sudo apt get install.
And the library that we want to install is the lib serial dev.
So let's press enter.
And actually we are going to use this library.
So the lib serial in order to communicate using the serial port with the Arduino device that will control
the robot movements.
Then let's also install some Python packages, starting with the Python package manager called pip.
So with sudo apt get install and let's install Python three pip.
Perfect.
And then still using pip we can install some Python packages.
So some packages that we are going to need only for the Python nodes.
And so let's use the pip install.
Let's start with the Pyserial package.
And so this library here basically is the same as this one here.
So this one is for the C plus plus.
So we're going to use the lib serial for the C plus plus node to communicate with the Arduino node.
And the Pyserial instead will be used to communicate with the Arduino board from a Python node.
So let's install it and let's use the brick system.
packages flag perfect.
So we have the pyserial.
Then let's also install with the same command.
So still using pip let's install the flask library.
So let's press enter.
And this library.
So we are going to use the flask library in order to communicate.
So in order to create a web server running on our PC.
So running on our robot that will be able to communicate with the Alexa API.
So that will receive actually the commands from Alexa.
Then still for the communication with Alexa, let's also install the flask ask SDK and also the ask
SDK.
So let's press enter.
And so we are going to use these three packages.
So the flask the flask ask SDK and also the ask SDK.
So we're going to use the three of them in order to communicate.
So in order to interface our robot with the Alexa voice assistant.