Why do we need the time sync functions? arduino node handle
Hi
Why do we need the time sync functions in the node_handle.h file? link text Whats the problem if the clock from the arduino and the host are not in sync? The arduino starts from 0 and from 1970 or something.
And if I use node_handle.now(), is this the time from the host or the Arduino?
Thanks
Asked by gab27 on 2019-02-28 08:52:19 UTC
Answers
Time sync between the host and the Arduino is needed so that data captured on the Arduino can be accurately timestamped.
node_handle.now()
returns the time synchronized from the host.
Asked by ahendrix on 2019-02-28 11:09:38 UTC
Comments
ok thanks But why not only take the time from the host? I do not get why they have to be synchronized? If I timestamp an event on the Arduino with the host time (48 years or something) is this a problem? If there is a second(later) event then I timestamp it with 48 years plus a few milliseconds? Thx
Asked by gab27 on 2019-02-28 12:16:04 UTC
The ROS messages are created and serialized on the arduino; the rosserial_python node that runs on the host doesn't have any knowledge of the internal message structure.
Asked by ahendrix on 2019-02-28 12:30:15 UTC
This allows you to write only the software that runs on the arduino, and to use a generic ROS node to connect the arduino to the rest of ROS.
Asked by ahendrix on 2019-02-28 12:30:22 UTC
Anyway, I'm happy to explain (as best I can) the reasons and uses for rosserial, but I'm not here to argue about it.
Asked by ahendrix on 2019-02-28 12:32:34 UTC
Comments