Time synchronization errors with multiple computers
I am experiencing a string of time synchronization errors that I am struggling with.
I have two different computers, each of which is streaming data from a different sensor. I have set the time update on each computer to look at a common time server (sudo ntpdate {ip.address}).
- Computer A runs a Hokuyo, the roscore, a robot urdf, amcl, and a processing node (A_p) for the hokuyo data.
- Computer B runs a Kinect, two processing nodes accessing the kinect (B_p), a node (C_p) fusing data from the kinect and the processing node (A_p), and another node fusing information from all of the nodes (A_p, B_p, and C_p) on computer A and B, and transforming their locations into map space (generated by amcl).
This configuration generates synchronization errors, even though everything uses ros::Time::now() to retrieve time. When fusing data in node B_p, I get time synchronization errors:
terminate called after throwing an instance of 'tf::ExtrapolationException what(): Lookup would require extrapolation into the past. Requested time 1362173375.685855810 but the earliest data is at time 1362173375.907669363, when looking up transform from frame [/robot_tf/back_laser] to frame [/robot_tf/base_link]
and when transforming data into /map space, I get transformation errors that I am assuming are also time synchronization errors:
terminate called after throwing an instance of 'tf::LookupException' what(): Frame id /robot_tf/base_link does not exist! Frames (6): Frame /robot_tf/camera2_depth_optical_frame exists with parent /robot_tf/camera2_depth_frame.
All of these processes work when on the same computer, but spread across 2 computers, they eventually fail... and eventually isn't very long. Can I get rid of these errors entirely? Barring that, how do I ignore these errors? Do I need to write my own exception handler, or is there something easy in ros already?
Thank you,