Simulated Time

asked 2018-01-17 23:25:34 -0500

Alanwar gravatar image

updated 2018-01-18 05:47:45 -0500

gvdhoorn gravatar image

Hi All,

I would like to compare two synchronization protocol using ROS. The fair way to compare two sync algorithm is to have two nodes using the same HW clock and every node will apply its sync algorithm, then we would be able to have a fair comparison as both of the nodes would use the same HW clock specification and capability.

Can I do this in ROS?

Thanks in Advance


Edit: It is related to Time synchronization ( https://en.wikipedia.org/wiki/Clock_s... ).

Consider the following example: We have reference server, node 1 and node 2.

node 1 is using NTP protocol to sync its local time with the server time.

node 2 is using PTP protocol to sync its local time with the server time.

Can we have a fair comparison between NTP and PTP performance? The fairness here would require simulated time concept which means that node 1 and node 2 should be using the same crystal hardware.

Thanks again!

edit retag flag offensive close merge delete

Comments

Can I do this in ROS?

Can you do what? Compare synchronisation protocols, or have nodes use the same HW clock?

The former would seem to be partly dependent on your experience and skill, while the latter -- in the simplest setup -- would just require running two nodes on the same machine.

gvdhoorn gravatar image gvdhoorn  ( 2018-01-18 01:48:22 -0500 )edit

Thanks for your prompt response. I appreciate that.

I meant comparing 2 sync protocols using ROS. Could you please give me some guidance to do that?. I see that all the nodes in ROS have the same notion of time.

Regards Amr

Alanwar gravatar image Alanwar  ( 2018-01-18 04:09:49 -0500 )edit

Tbh I don't really understand what you are trying to do. What would the algorithms be syncing exactly? A shared common state? Some distributed database? Or is this purely about time synchronisation (ie: lockstep execution)?

gvdhoorn gravatar image gvdhoorn  ( 2018-01-18 04:36:09 -0500 )edit

Can I ask you to please not post answers for interaction with other posters or for adding more information to your question?

Only post answers if you're actually answering your own question.

For everything else: edit your original question, or use comments.

gvdhoorn gravatar image gvdhoorn  ( 2018-01-18 05:51:50 -0500 )edit

re: your edit: you could probably use ROS msgs for this. It seems largely orthogonal to ROS to me though.

node 1 and node 2 should be using the same crystal hardware.

again: run all involved nodes on the same computer?

gvdhoorn gravatar image gvdhoorn  ( 2018-01-18 05:54:49 -0500 )edit

I am sorry for that. It is my first experience.

I am not sure how this can be done by ROS msgs?

Alanwar gravatar image Alanwar  ( 2018-01-18 06:40:44 -0500 )edit

Yes, both of them would be on the same computer.

Time in Ros is maintained by ( http://wiki.ros.org/roscpp/Overview/Time ). So the question would be can I get two instance of ros::Time where each instance is based on some sync protocol?

Alanwar gravatar image Alanwar  ( 2018-01-18 06:41:30 -0500 )edit