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
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 22.214.171.124 server 126.96.36.199 server 188.8.131.52 server 184.108.40.206 # 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
Then restart the chrony daemon:
sudo /etc/init.d/chrony restart
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