Ask Your Question
0

Questions regarding ROS time synchronization

asked 2020-01-07 18:35:35 -0500

thompson104 gravatar image

Hi all,

MY question is related to here. We have a remote PC, local PC and a jetson running at the same time. I was told that ROS time synchronization is important in this situation. My question is what would be the potential advantages of time synchronization? Could you make one counter example of what could happen if I don't perform time synchronization?

Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-08 01:35:24 -0500

gvdhoorn gravatar image

updated 2020-01-08 02:18:11 -0500

Could you make one counter example of what could happen if I don't perform time synchronization?

It becomes impossible to correlate any messages with Headers, as comparing their stamps becomes meaningless.

And by extension: matching messages to TF frames also becomes impossible, as again, comparing stamps from systems with unsynchronised clocks is impossible.

(and these are just two examples)


Edit:

Thank you gvdoorn. The weird thing is that currently the entire system is not "time synchronized". But still they can read sensor values from remote PC and jetson, send all the values to local PC which then calculates the control inputs and sends back to the remote PC and jetson.

You could just be lucky and have a configuration that works without synchronisation, or the clocks are close enough for your current use-case.

If you're not actually "using" time, not having synchronised clocks would obviously not be a problem. One example of a system not using time would be one where no Stamped messages are used, or where TF is not used, or if TF is used, only the latest available transforms are being used (ie: ros::Time(0) instead of using the stamp to look up a transform). If you have a relatively simple control loop which only uses "latest" data, not having synchronised the clocks would most likely not lead to any problems.

I wonder what would be the negative effects of current setup? Is the system overall loop rate going to be quicker if I perform "time synchronization"?

This is not about performance (or at least not that part which is measured in "loop rate"): it's about consistency and coherency.

I would strongly recommend you invest 30 minutes in setting up proper time sync between all involved hosts, as it will save you headaches in the (near) future.

edit flag offensive delete link more

Comments

Note: this is not a "ROS thing".

Unsynchronised clocks in a distributed system where you want to be able to correlate data coming from different participants/hosts based on timestamps (fi to establish a happened-before relationship) would become much more difficult (if not completely impossible).

gvdhoorn gravatar image gvdhoorn  ( 2020-01-08 01:36:41 -0500 )edit

Thank you gvdoorn. The weird thing is that currently the entire system is not "time synchronized". But still they can read sensor values from remote PC and jetson, send all the values to local PC which then calculates the control inputs and sends back to the remote PC and jetson. I wonder what would be the negative effects of current setup? Is the system overall loop rate going to be quicker if I perform "time synchronization"?

thompson104 gravatar image thompson104  ( 2020-01-08 01:41:07 -0500 )edit

Again, thank you so much for your help. Kind of wonder how did you know all of this. Really appreciate it.

thompson104 gravatar image thompson104  ( 2020-01-08 02:16:54 -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

1 follower

Stats

Asked: 2020-01-07 18:35:35 -0500

Seen: 56 times

Last updated: Jan 08