Two machines clock synchronization in Ros

Source: Internet
Author: User
Tags chrony

During the simultaneous operation of the two machines, the TF transformation of ROS requires that the clocks of the two machines be kept in accordance with one another.

1. Query time

First, look at the difference between the two machine clocks with the following command. On this computer, view the machine time of the remote master:

Ntpdate-q other_computer_ip

For example

192.168. 0.23

Or you can query the time of the machine by entering the date command directly at the terminal:

Date

2, Installation Chrony

Execute the following command:

sudo Install Chrony

3. Configuration

Then edit the configuration file:

sudo gedit/etc/chrony/chrony.conf

To synchronize the time of the machine to master, Add the following command to sudo gedit/etc/chrony/chrony.conf:

0 5 Maxdelay.      #c1为master所在的计算机ip或者域名

If there is a big difference, such as a few minutes, sync time, execute the following command:

/etc/init.d/chrony stopntpdate other_computer_ip/etc/init.d/chrony start
other_computer_ip represents the IP of the remote master machine, such as 192.168.0.23, which is:

Resources:

1. Http://wiki.ros.org/ROS/NetworkSetup

Two machines clock synchronization in Ros

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.