Time Synchronisations

This page describes the configuration of the time synchronisation system using Chrony. The master instance of Chrony should be running on the main computer, that daemon will broadcast the current time to other machines and robot.

Installation of chrony

On each machine used to run ROS nodes run the following command:

$ sudo apt-get install chrony

Master Configuration

The master is a computer running the Chrony daemon that broadcasts the time.

the content of the /etc/chrony/chrony.conf:

# Servers of the network time
server 37.157.196.163
server 81.27.192.20
server 195.140.254.217
server 178.238.46.152

# Authentication
keyfile /etc/chrony/chrony.keys
commandkey 1

# I moved the driftfile to /var/lib/chrony to comply with the Debian
# filesystem standard.
driftfile /var/lib/chrony/chrony.drift

# Comment this line out to turn off logging.
log tracking measurements statistics
logdir /var/log/chrony

# Broadcast every 10 sec
broadcast 60 192.168.0.255

# The CMOS time is in UTC
rtconutc

The /etc/chrony/crony.keys:

1 password

Then restart the chrony daemon:

sudo /etc/init.d/chrony restart

Slave Configuration

Slave is a computer that is running Chrony daemon which listens to the Chrony master.

server 192.168.0.107
keyfile /etc/chrony/chrony.keys
commandkey 1
driftfile /var/lib/chrony/chrony.drift
log tracking measurements statistics
logdir /car/log/chrony
maxupdateskew 100.0
dumponexit
dumpdir /var/lib/chrony
logchange 0.5
rtconutc

Key file is same as for master

Resource