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

Latency between nodes

asked 2022-04-12 09:00:47 -0500

risbo6 gravatar image

updated 2022-04-12 09:01:18 -0500


Let's imagine that I have the following three nodes :

  1. Nodes A and B are running on machine 1.
  2. Node C is running on machine 2 (Roscore runs on machine 2).

Machines 1 and 2 are on the same ROS network . If you ping machine 2 from machine 1, you'll get around 50 ms of delay.

My question is pretty simple, what will be the delay if node A is communicating with node B ? Will it be less than 50 ms since both nodes are running on the same machine or will it go through machine 2 ?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-04-12 09:22:41 -0500

FurkanEdizkan gravatar image

updated 2022-04-14 04:56:01 -0500

I can't answer correctly what will happen to the delay, but every ROS message has a timestamp attached to it. So maybe you could try to send a dummy message and compare the timestamps of sent and received messages. Maybe look into the this answer. Hope it helps!

Edit1: As far as I know it should work similar to image below, If I am wrong please tell me.

Edit2: So, roscore registers all to all but communication between nodes/messages are directly connected. image description

Here are some links that could help

edit flag offensive delete link more



The ROS Master is not involved in communication between nodes. They are all peer-to-peer. So for nodes "on the same machine", they will have a direct connection. For nodes on different machines, they will also open direct connections.

In your diagram, node 2-1 would open a direct connection to node 3-1. There would be no traffic through Computer 1 Roscore.

I don't have the possibility to do it myself, but please search ROS Answers for previous Q&As about this topic. There have been a few. Use Google and append to your search query.

gvdhoorn gravatar image gvdhoorn  ( 2022-04-13 14:52:28 -0500 )edit

I did some research and edit my answer again hope this time it is correct, thank you!

FurkanEdizkan gravatar image FurkanEdizkan  ( 2022-04-14 02:54:01 -0500 )edit

I'm not seeing anything different.

Your diagram still implies communication between Node 2-1 and Node 3-1 would be "routed through" the ROS Master on Computer 1.

gvdhoorn gravatar image gvdhoorn  ( 2022-04-14 03:59:42 -0500 )edit

Should have deleted first picture, my bad

FurkanEdizkan gravatar image FurkanEdizkan  ( 2022-04-14 04:53:29 -0500 )edit

Question Tools

1 follower


Asked: 2022-04-12 09:00:47 -0500

Seen: 456 times

Last updated: Apr 14 '22