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

How can I measure the delay in a multisystem ROS

asked 2015-07-13 10:32:39 -0600

Saeid gravatar image

Hi guys,

I’ve a PC in which my ROS core is running. I control 2 RaspberryPis through ROS by this PC. There are some nodes on RaspberryPis and some others on my PC. For a part of my project I would measure the time which is taken just when I give an input to a node on my PC and a node on one of RaspberryPis does something. How can I measure this delay. I have already used ''Chrony'' and my systems are synchronized to my PC.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2015-07-14 00:53:42 -0600

ahendrix gravatar image

If the messages that you're sending have headers, you can set the timestamp in the header when the message is transmitted (if the timestamp isn't set already), and then in the callback on the other machine, you can compare that timestamp to the current time.

edit flag offensive delete link more

Comments

Thanks for your interest to answer me man. I am new in this staff. Can you please give some advise how to use this header. I googled but I understood nothing. Thanks

Saeid gravatar image Saeid  ( 2015-07-15 07:16:41 -0600 )edit

I found it, thanks

Saeid gravatar image Saeid  ( 2015-07-15 09:46:02 -0600 )edit

For completeness, most messages in ROS have a field called "stamp" of type "time" that is usually set to the time the message was published, see http://docs.ros.org/en/lunar/api/std_... for an example of this field. Therefore, a subscriber could subscribe to such a topic published from another machine and compare it to the current time now to see the delay for the message to be recieved.

Den gravatar image Den  ( 2022-03-28 22:08:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-07-13 10:32:39 -0600

Seen: 732 times

Last updated: Jul 14 '15