WEBVTT

00:00.320 --> 00:07.490
All the robot's hardware, its arms and the gripper will be actuated by servo motors that are connected

00:07.490 --> 00:10.580
to the Arduino Uno or any compatible board.

00:11.300 --> 00:17.150
The goal of the first lesson in this course, therefore, is to establish a bidirectional communication

00:17.150 --> 00:21.530
between the Arduino and our PC, where Ros two is running.

00:22.290 --> 00:23.820
At this point in the course.

00:23.820 --> 00:29.640
The architecture of our project involves a PC running Ros two with all the logic.

00:29.640 --> 00:35.970
So we told the application that the robot is using such as Move It Ros to control the task server and

00:35.970 --> 00:37.620
also the interface with Alexa.

00:37.710 --> 00:44.160
And on the other end there is the microcontroller that controls the robot's motors and possibly reads

00:44.160 --> 00:47.550
data from the sensors you want to equip the robot with.

00:48.400 --> 00:51.700
This is our typical architecture of our robotics project.

00:51.730 --> 00:57.160
On one side, there's the electronics, mechanics, sensors and actuation.

00:57.280 --> 01:03.790
These components are often managed by a microcontroller board with normally with limited computing and

01:03.790 --> 01:05.140
memory capabilities.

01:05.440 --> 01:11.770
Typically, the only objective of this board is to read data from sensors and send actuation commands

01:11.770 --> 01:12.730
to the motors.

01:14.550 --> 01:20.430
All the logic, the functionalities and the software of the robot are on the other side, often lying

01:20.430 --> 01:26.910
on a PC with a microprocessor and possibly a graphics card that is capable of processing vast amounts

01:26.910 --> 01:30.420
of information and running various applications in parallel.

01:31.150 --> 01:35.560
Generally, this is where the logic to process sensor data is contained.

01:35.560 --> 01:42.310
For example, to detect the presence of an obstacle near to the robot and to calculate the trajectory

01:42.310 --> 01:44.650
and the actuation command for the robot.

01:45.520 --> 01:49.750
To connect these two words, the hardware and the software.

01:49.750 --> 01:57.010
We can use serial communication through a classic USB cable and use it to transmit those two messages

01:57.010 --> 01:59.170
to the Arduino in binary format.

01:59.860 --> 02:04.840
In this way we can use the same publisher subscriber communication protocol that is available in Ros

02:04.840 --> 02:11.260
two to serialize messages and publish them, sending them to the Arduino, which can then read those

02:11.260 --> 02:16.570
messages that are passing through the Ros two topics and also publish some new messages.

02:17.290 --> 02:23.170
However, when we do this, that is when we use the Arduino to exchange messages with other Ros two

02:23.170 --> 02:23.890
nodes.

02:24.010 --> 02:29.530
We mustn't forget that this board has limited computational and memory capabilities.

02:29.680 --> 02:33.880
Therefore, we must pay a particular attention to the size of the Ros.

02:33.880 --> 02:40.810
Two messages that we are going to use, and we have to ensure that they contain only the necessary information

02:40.810 --> 02:42.160
and no overhead.
