ROS, Robot Operating System, is a set of open-source frameworks with a great community of developers, both from industrial and academic fields. for robot programming.

Developed at the University of Standford by Willow Garage in 2007, it has evolved to become a reference point for the scientific community and beyond.

Once you have learned to use this tool efficiently, you will be able to develop robotic applications in a very short time and with excellent results.

As usual, of course, you need to learn the basics first.

Being such a large and powerful picture, ROS presents an initially steep learning curve that can frighten most people.

With the next series of articles dedicated to this tool, you will lay the foundations for a robust knowledge of ROS and the libraries of which it is composed.

Do not re-invent the wheel!

Whenever there is a need to face a project, the temptation can always be to develop everything from scratch.
This implies a a lot of time and energy in order to produce code related to very low level functionalities, getting results that are often not so good as we would expect.

ROS aims to create low-level parts to allow the developer to focus on more specific and advanced features.

The result is less time spent on development and less bugs since it is possible to use libraries developed and maintained by hundreds of developers around the globe.

Nodes and Libraries

ROS community has worked a lot on developing robust libraries that solve many of the most common problems.

In addition to helping us from the point of view of functionality development, ROS also helps us with regards to the architecture of the project.

If you have already had the opportunity to start some development, you will certainly have realized that the more components you add, the more difficult it becomes to keep the code well organized and scalable. The result is often that adding just another component and integrating it, becomes a big problem.

In this sense ROS guides the developer to structure the code through the concept of node.

A node takes care of managing the operating logic of a specific part of the project.
Each node can then communicate with the others through native tools that the framework makes available.

Let’s take for example a design of an anthropomorphic arm.
Developing it implies the definition of different nodes that will each manage a specific part of the assembly:

In the example it is necessary, among many others, to develop a trajectory planning node, that is a block of code that deals with calculating the rotations that the different axes of the robotic arm will have to carry out in order to draw the right trajectory and allow the end-effector to move into position.

Realizing such a thing from scratch means spending a lot of time dealing with problems of reverse kinematics, planning trajectories to avoid obstacles, etc.

ROS, as mentioned before, provides plug & play libraries which in a few steps will allow you to use one of the many trajectory planning nodes already developed and tested.

In addition to this, the organization in nodes and the fact that these are completely independent from the rest of the world will ensure that the code remains well structured and divided.

ROS is Language Agnostic!

The last but not the least, we cannot fail to mention the fact that ROS is language agnostic.

What does it mean?

In ROS each node of the previous example can be developed in a different language.

This is possible simply because the communication tools used to connect the various nodes do not depend on any specific language.

Currently the supported languages ​​are Python, C ++, Lisp, Java and Lua.

In our articles we are going to focus on Python and C++.
Let’s move on to prepare the environment for installing ROS!