ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

What is the role of ROS in a complete robot?

asked 2016-06-17 22:44:58 -0500

snakeninny gravatar image


After raising this question, I've realized that, unlike what I've known as an iOS developer that iOS is almost the only thing we developers should concern, ROS itself is not an operating system but a framework, a set of libraries. And besides that, what a robot exposes to developers are far more than an iPhone does. So these are all new concepts for me to absorb and it may take a while ;)

My question is, what's the role of ROS in a robot?

Can someone please give us a detailed explanation of what a robot is generally comprised of, with examples? Say in Roomba, I know it has its own operating system; what part of Roomba plays a similar role as ROS?



edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-06-18 03:04:18 -0500

dulluhan gravatar image

Hello snakeninny,

At this point in your research I hope you now understand the concept of nodes and packages in ROS, or simply the existence of them. Due to the complexity of a lot of the decisions made or computations being performed by the robot, it is no longer feasible for all of the software to be written in one package. Therefore a lot of functionalities are grouped into these nodes and executed together.

From your background, you can understand these nodes as objects that does different things. Eg. A node that processes computer vision; an eye object. A node that processes speech; an mouth object. A node that processes actuator controls, a cerebellum object. Objects in a OOD sense.

What ROS as an "operating system" does is to facilitate a framework where these nodes can all communicate with one another to perform complex tasks that requires simultaneous stimuli from different sensors and perform calculations.

The Roomba is a very simple robot compared to other systems you may see being created with ROS. A Roomba replica can easily be created with an Arduino. It's like comparing a goldfish to a human brain. We can no doubt sleep, eat and move as a goldfish can; just like how a ROS system can do what a Roomba does. But in cases where you want to be able to tell the difference between what you are eating, or being able to dance, a goldfish cannot do that.

In most cases, I like to think of micro controllers like the arduino as controllers for individual components, taking orders from individual nodes. Eg. A movement node says it wants to move forward, and the arduino controls the ESC on the robot to move the motor. The arduino knows how to turn, how to activate motors, but it will not be smart enough to know how to move to properly tango.

A usual chain of command in systems I work with looks something like:

  • Sensors detect object
  • AI node uses other sensors to decide what type of object it is
  • AI decides that it needs to move left-forward-right to avoid the object
  • Movement node receives left-forward-right command from AI
  • Movement node sends left, forward, right as seperate commands to the Arduino that controlls the motors, checking between commands that the robot is moving correctly.

All this is based off of my own understanding and experience with ROS, and ROS can certainly be more complex or simple depending on the application. But hopefully this is a starting point for you.

Cheers, Dulluhan

edit flag offensive delete link more


In my understanding, nodes are like processes, performing various operations. According to your description, ROS seems like a commcenter of all nodes/processes inside a robot, may I say so? If there's such a commcenter in Roomba (or any other advanced robots), that's the equivalent of ROS, right?

snakeninny gravatar image snakeninny  ( 2016-06-19 09:05:59 -0500 )edit

Yes, however it is important to note that most of ROS's functionalities are passive. ROS is a facilitator of information exchange between nodes. Just like how your ips connects you to other people, servers, computers but does not actually do computation for you, the nodes produce the information

dulluhan gravatar image dulluhan  ( 2016-06-19 17:28:09 -0500 )edit

So actually ROS defines a universal standard for processes on robot operating systems to work with each other. Other vender OSes have done this too, but each in their own ways. Is that right?

snakeninny gravatar image snakeninny  ( 2016-06-19 22:34:40 -0500 )edit

Found a definition from here:

At the core of ROS is an anonymous publish-subscribe middleware system

So I think that's it ;)

snakeninny gravatar image snakeninny  ( 2016-06-20 02:20:56 -0500 )edit

That's not entirely accurate. In addition to anonymous publish-subscribe communications there is also services and action servers.

Icehawk101 gravatar image Icehawk101  ( 2016-06-21 09:00:25 -0500 )edit

answered 2016-06-18 18:26:07 -0500

Thang Nguyen gravatar image

I am new to ROS to but I think I can answer your question.

ROS as you know is not an OS like iOS. But it provides framework and libraries relating to robotics. With libraries you can creates your nodes. Each of your nodes implements a function based on the input message(location data, distance data, video image, etc) .Framework provides environment for nodes running and communication to each other.

edit flag offensive delete link more


Yes, it becomes clearer now: ROS is like a commcenter for all nodes, right?

snakeninny gravatar image snakeninny  ( 2016-06-19 09:09:24 -0500 )edit

I am not a professional of ROS but ROS does more than just providing libraries and algorithms, it provides mostly a complete runtime environment. It is a middleware. It allows to control and supervise multiple tasks over multiple different environments.

lfr gravatar image lfr  ( 2016-06-20 06:28:22 -0500 )edit

That's what I mean when I say framework

Thang Nguyen gravatar image Thang Nguyen  ( 2016-06-20 08:18:51 -0500 )edit

Question Tools



Asked: 2016-06-17 22:44:58 -0500

Seen: 610 times

Last updated: Jun 18 '16