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

Capabilities of Distributed Processing in ROS

asked 2015-07-26 10:04:50 -0500

d7x gravatar image

I have 2 questions about how distributed processing works: 1) Is it possible to selectively choose which computer/single board computer is used for different packages? For example, can the open cv package be run on board 1 while packages related to SLAM are run on board 2? So, is it possible to tell ROS where each package should be run and just have a default board identified that is used to run all packages that aren't specifically identified? Would that just mean that one would start different processes on different boards - just wondering how this is done. 2) For packages that are very computationally intense is it possible to split the processing of a package like open cv to run on multiple boards?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-07-26 11:48:24 -0500

gvdhoorn gravatar image

updated 2015-07-26 12:08:37 -0500

I think it is important to understand that packages are nothing special: they are just a convenient way to distribute one or several nodes (and related files) that happen to have some kind of relationship (ie: operate on the same data, on the same concepts and / or same domain model).

Nodes are nothing but ordinary Linux/OSX/Windows (sometimes) programs, where the authors have chosen to use the ROS middleware (ie: software that takes care of distributing the messages) to communicate with other programs that have been written that way.

One of the specific advantages of using the ROS middlware, is that nodes become agnostic to where they are running: within the same process (nodelets), on the same machine (nodes) or distributed over multiple machines connected through a TCP/IP network (still nodes). An immediate consequence of this fact is that how nodes are deployed (ie: where they are run and in what way) becomes a configuration phase decision, not an implementation one.

A more thorough explanation of this can be found on the wiki/Concepts page and its various subpages.

Coming back to your questions:

1) Is it possible to selectively choose which computer/single board computer is used for different packages?

I hope it is clear that you are completely responsible for how you deploy your nodes. There is no automated system for this, so use your knowledge of / insight into your application's requirements and constraints, resource usage of the involved nodes and the hardware they need to have access to.

So, is it possible to tell ROS where each package should be run [..]?

Yes. You can setup launch files to launch nodes on different machines, identified by their hostnames (see wiki/roslaunch/XML/machine and wiki/Roslaunch tips for large projects - Machine tags and Environment Variables).

[..] and [..] have a default board identified that is used to run all packages that aren't specifically identified?

I haven't used it, but the default attribute seems to allow you to express just that: "Sets this machine as the default to assign nodes to".

2) For packages that are very computationally intense is it possible to split the processing of a package like open cv to run on multiple boards?

I hope it is also clear now that 'splitting a package' is not really something that makes sense: the only thing you could possible do is run the different nodes provided by a package on different cpus/machines. Obviously that is only possible if the package contains multiple nodes in the first place. But if it does, then it should be possible.

You have to keep in mind though that messaging isn't free: it uses cpu time, memory and network bandwidth. In addition it introduces latency (time between sending and receiving). For things like image processing the cost might be such that it completely negates any advantage you may gain from distributing your computations.

So, yes, it is possible, but it doesn't necessarily lead to better performance ... (more)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-07-26 10:04:50 -0500

Seen: 406 times

Last updated: Jul 26 '15