A brief summarizing about ROS

Lucasvittal
4 min readMar 2, 2022

The robotic system is getting more and even more important nowadays, mainly because the necessity for automation and optimizations is getting even more bigger. Facing this contenxt a operating born as good solutions for great part of robitics problems, ROS.

ROS means Robotic Operating system and as the name suggests, it’s a collection of tools, libraries and convections that aim to simplify the task of creating complex and robust robot behavior acroos wide variety of robotic plataforms. Basically is a robotic framework that aim to design robotics systems more easelly and thus solve associeted problems.

This system was built upon the graph abstraction, and therefore all ROS systema can be understood as a node web(graph), its edges and the flux of data between them. Each node represents a softaware module or subsystems, and they are independent each other, in other words, each nodes will keep running even a some other node beeing shutted down or crashed for some reason. The edges represents the streaming of messages where the flux of data ocurrs, while the system is working the nodes can reacieve or send message at any time.

The image bellow simulates a ROS system working:

The ROS system organization

In the previous topic we present in simple term what ROS is, but we didn’t talk about the system organization, i.e, how nodes, edges and flux of data are organized. As we dicussed previously ROS essentially is a graph system as we know grapsh is a set of node and its connections. In this manner, we will Talk aboutthe definitions of graph and the system organization.

Nodes

The most simple way to organize nodes is thiking in the nodes creating by the user and the roscore, a base node where the system only works if this node were running. that is because Roscore works as a bridge for messages beeing transmited across the entire system, therefore every message passes through roscore, exactly like all information that is send or arrive in our phones passes through an radio antena, therefore roscore is the “radio antena node”. Therefore, as well as phones cannot communicate each orther, the nodes cannot communicate each other and thus the systemy don’t work without roscore were not running.

The nodes created by user, i.e the system designed by users, can be grouped in packages forming something like a hypernode, usally it’s used between node that has a great relationshiop between each other, what allow a clear logic organization of entire system.

Thanks to this architeture, the desgining of complex robotic system get much more easy best way the resolve complex complex is breaking it in little peaces and thus design solution for theses systems gets more easy.

Edges

As discussed at previous topics, edges are the flux of of data between the nodes. The messsage that circle along the system can be classified in two types, in a topic or in a service.

Topic is a kind of message that is sent/recived asinchronously andhas a defined data type. Before a node start to transmit a topic, it should announce what is the topic name and its data type and nodes that want recieve the topic must subscribe for it. Therefore a node is only be capable to recieve a topic if this node subscription have the name a datatype announced by the correpondent node talker.

For Services, they allow to call a function that executes in another node. The server speficies a callback to deal with service request and adviertises the service and then the service accesses this service through a local proxy.

Service calls are well suited to things that you only need to do occasionally and that take abounded amount of time to complete. Common computations, which you might want todistribute to other computers, are a good example. Discrete actions that the robot mightdo, such as turning on a sensor or taking a high-resolution picture with a camera, are alsogood candidates for a service-call implementation.

in both data flowing cases theres is especific files, for topics a file that define the messages types and message names(.msg) and for services a file that defines the input and output names and the correpondent data types (.srv).

In this article I gave a brief description about ROS, just to summirize and share everything that I understand.

For more details I really reccomend follow the Programming with ROS written by Morgan Quigley, Brian Gerkey & William D.Smart, it teachs ROS in a pratical way and therefore it is an excelent hands-on learning:

Regards,

Lucas Vital

--

--