All the robot's hardware, its arms and the gripper will be actuated by servo motors that are connected
to the Arduino Uno or any compatible board.
The goal of the first lesson in this course, therefore, is to establish a bidirectional communication
between the Arduino and our PC, where Ros two is running.
At this point in the course.
The architecture of our project involves a PC running Ros two with all the logic.
So we told the application that the robot is using such as Move It Ros to control the task server and
also the interface with Alexa.
And on the other end there is the microcontroller that controls the robot's motors and possibly reads
data from the sensors you want to equip the robot with.
This is our typical architecture of our robotics project.
On one side, there's the electronics, mechanics, sensors and actuation.
These components are often managed by a microcontroller board with normally with limited computing and
memory capabilities.
Typically, the only objective of this board is to read data from sensors and send actuation commands
to the motors.
All the logic, the functionalities and the software of the robot are on the other side, often lying
on a PC with a microprocessor and possibly a graphics card that is capable of processing vast amounts
of information and running various applications in parallel.
Generally, this is where the logic to process sensor data is contained.
For example, to detect the presence of an obstacle near to the robot and to calculate the trajectory
and the actuation command for the robot.
To connect these two words, the hardware and the software.
We can use serial communication through a classic USB cable and use it to transmit those two messages
to the Arduino in binary format.
In this way we can use the same publisher subscriber communication protocol that is available in Ros
two to serialize messages and publish them, sending them to the Arduino, which can then read those
messages that are passing through the Ros two topics and also publish some new messages.
However, when we do this, that is when we use the Arduino to exchange messages with other Ros two
nodes.
We mustn't forget that this board has limited computational and memory capabilities.
Therefore, we must pay a particular attention to the size of the Ros.
Two messages that we are going to use, and we have to ensure that they contain only the necessary information
and no overhead.