Ask Your Question
0

Clock signal across multiple machines

asked 2019-07-19 11:01:12 -0600

iabadia gravatar image

updated 2019-07-19 11:16:33 -0600

Hi,

I'd like to know how the clock signal works when running a ROS sytem across multiple machines (all machines using the same master, of course). Does the ROS Master set the clock signal for all nodes on all machines? Or does each machine have its own clock signal?

Thanks in advance,

Ignacio

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
4

answered 2019-07-19 12:51:43 -0600

gvdhoorn gravatar image

I'd like to know how the clock signal works when running a ROS sytem across multiple machines

with "clock signal" are you referring to the clock topic?

If you are, then I believe the wiki/Clock page has a good bit of information on how that works:

Normally, the ROS client libraries will use your computer's system clock as a time source, also known as the "wall-clock" or "wall-time" (like the clock on the wall of your lab). When you are running a simulation or playing back logged data, however, it is often desirable to instead have the system use a simulated clock so that you can have accelerated, slowed, or stepped control over your system's perceived time. For example, if you are playing back sensor data into your system, you may wish to have your time correspond to the timestamps of the sensor data.

To support this, the ROS client libraries can listen to the /clock topic that is used to publish "simulation time".

Summarising:

  • normal operation: ROS nodes use the system's clock
  • simulation: nodes use simulation time (published by the simulator) coming in on the clock topic

The same page has this to say about multi-machine setups:

When using wall-clock time on multiple machines, it is important that you synchronize time between them. ROS does not provide this functionality as there are already well-established methods (e.g. ntp, our recommended syncronization tool is chrony) for doing this. If you do not synchronize the wall-clocks of multiple machines, they will not agree on temporal calculations like those used in tf.

So coming back to your question:

Does the ROS Master set the clock signal for all nodes on all machines? Or does each machine have its own clock signal?

The ROS master doesn't do anything with /clock, nor does a non-simulation setup do anything with /clock. And with a multi-machine ROS setup, you are responsible for making sure all system clocks are synchronised (which is not a ROS-specific task, so generic tools can be used).

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-07-19 11:01:12 -0600

Seen: 56 times

Last updated: Jul 19