ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It sounds like the clocks on your computers aren't running at the same for some reason; perhaps because they're drifting, or perhaps because NTP/chrony is slewing one of the clocks to try to match it up with the NTP server. When running multi-computer networks with ROS, it's usually good practice to run an NTP server on one machine, and configure the NTP clients on the rest of the machines to use that machine as their NTP server. This way, the clocks for your network will stay in sync with each other even if you don't have an internet connection.

If you inspect the system while it's running, are messages from both computers received at the same time? Do messages that are received at the same time have the same timestamps? This should be able to give you an idea of if the clocks on both computers are running at the same rate or not.

Since rosbag records both the received timestamp and the header timestamps, it's possible to compare them and correct one based on the other; either rosbag->header or header->rosbag. There are some examples in the rosbag cookbook that may be useful for this.