Ask Your Question
0

ROS Network Architecture - Bottlenecks?

asked 2020-02-01 20:46:30 -0500

mechapancake gravatar image

New to ROS so thanks in advance for your patience!

My planned network architecture consists of a central computer connected via wifi to several (10+) mobile robots. I would like to use ROS to send high level commands from the central computer to the robots, and also to receive high level telemetry information.

But, I will also have several ROS nodes on each individual robot (on a single processor) which will be passing data back and forth with each other. This on-robot processing will happen at a much higher rate than the communication between the central computer and the robots. Note the individual robots won't talk directly to each other at all.

I plan to run my roscore master on the central computer. My concern is about possible network congestion with the ROS traffic on each individual robot. Question 1) Does all ROS traffic pass through the master? Or would messages between nodes residing on a single machine (not the master) stay fully on that machine?

Also, I may have situations where individual robots enter a region with spotty wifi signal, and so will temporarily not have a connection with the master. Question 2) Will that robot's communication between its own ROS nodes (not with the central computer's nodes) be affected by a potential dropout of the connection with the ROS master?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-02 10:42:58 -0500

gvdhoorn gravatar image

There are several duplicates of these questions on this site -- but I can't find them without Googling too long, so I'll answer this again.

Does all ROS traffic pass through the master?

No, this is not MQTT with a broker. Messages are exchanged peer-to-peer.

Or would messages between nodes residing on a single machine (not the master) stay fully on that machine?

(this is the complement of your earlier question, so): yes.

I may have situations where individual robots enter a region with spotty wifi signal, and so will temporarily not have a connection with the master. Question 2) Will that robot's communication between its own ROS nodes (not with the central computer's nodes) be affected by a potential dropout of the connection with the ROS master?

Theoretically: no, as long as no new connections are being setup, things should keep working, as the master is only involved in setting up new subscriptions and other connections between nodes (it's essentially a DNS).

In practice this is almost never the case, and things will stop working (or most likely: start to time-out).

You'll want to run a master on each individual robot instead. This is almost always recommended when having this many robots.

Look into multimaster_fkie and similar packages.

edit flag offensive delete link more

Comments

In addition to this: I'd recommend you spend a few minutes reading wiki/ROS/Introduction. It will clear up a lot of things (including what the role of the master is).

gvdhoorn gravatar image gvdhoorn  ( 2020-02-02 10:43:44 -0500 )edit

Also: note that ROS 2 is different in this regard: it's fully peer-to-peer. No centralised discovery.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-02 10:44:11 -0500 )edit

Thanks for clearing that up. So network traffic doesn't route through the master, but the master still needs to be periodically accessible to avoid problems due to time-outs. Or are the time-outs you refer to something else?

mechapancake gravatar image mechapancake  ( 2020-02-03 13:09:28 -0500 )edit

The time-outs are due to this:

the master is [..] involved in setting up new subscriptions

So nodes will start to time-out when they are trying to setup new connections.

But if you setup a proper multi-master setup that will not be a problem -- as each robot is its own master.

the master still needs to be periodically accessible

No, there's nothing periodic about it. It all depends on when nodes want to subscribe to a new topic or want to execute a service.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-03 13:12:52 -0500 )edit

So it seems my options are ROS+multimaster_fkie (or similar) or ROS 2. After looking into ROS 2 a bit, it seems like that might be the way to go, since I'm just starting out anyway. Regarding my original question about network congestion, is there any reason to stick with ROS+multimaster_fkie or should I just go ROS 2?

mechapancake gravatar image mechapancake  ( 2020-02-03 23:21:13 -0500 )edit

Personally I would not make this decision based on network utilisation alone.

ROS 2 is certainly an option, but realise there is far less in terms of documentation, examples, books and available software for it. ROS 1 is certainly not perfect, but if you're really just starting out, you may benefit tremendously from having existing systems and a community to lean on.

Unfortunately I cannot make this decision for you, as it will depend on many factors that I don't know.

gvdhoorn gravatar image gvdhoorn  ( 2020-02-04 04:14:04 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-02-01 20:46:30 -0500

Seen: 534 times

Last updated: Feb 02