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

Why do we need the time sync functions? arduino node handle

asked 2019-02-28 07:52:19 -0600

gab27 gravatar image

updated 2019-02-28 12:58:57 -0600


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, is this the time from the host or the Arduino?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-02-28 10:09:38 -0600

ahendrix gravatar image

Time sync between the host and the Arduino is needed so that data captured on the Arduino can be accurately timestamped. returns the time synchronized from the host.

edit flag offensive delete link more


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

gab27 gravatar image gab27  ( 2019-02-28 11:16:04 -0600 )edit

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.

ahendrix gravatar image ahendrix  ( 2019-02-28 11:30:15 -0600 )edit

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.

ahendrix gravatar image ahendrix  ( 2019-02-28 11:30:22 -0600 )edit

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.

ahendrix gravatar image ahendrix  ( 2019-02-28 11:32:34 -0600 )edit

Question Tools



Asked: 2019-02-28 07:52:19 -0600

Seen: 467 times

Last updated: Feb 28 '19