Ask Your Question
0

communication among multiple computers in ROS

asked 2019-06-24 22:21:04 -0500

ganechean gravatar image

How can I compute the time of transferring message from publisher to subscriber?
Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-25 10:15:22 -0500

ChuiV gravatar image

Are you're asking about how to measure network latency between the two computers? Assuming both computers are NTP'ed to the same time server and if the message being passed is "Stamped" you can put in the time of the message right before you publish it, then get the time that the message was received, and compute the difference.

Of course this isn't the most accurate way to compute the time difference, but it'll at least get you into the ballpark.

edit flag offensive delete link more

Comments

Thanks a lot.

I have solved this problem. But I have lost in new trouble,how can I reduce the network latency or influence of network latency when multiple computer communicate with each other in Robot Operating System connected by wireless network? Could you please give me some guidance? Thanks again.

ganechean gravatar imageganechean ( 2019-06-25 23:34:34 -0500 )edit

That depends entirely on what you're trying to accomplish. So more details about what information is going from computer A -> B, and what computer B is needing to do with that information. Does computer A then need to react to what computer B produces?

Generally, you should avoid having any essential processes running on separate computers, as you will always have that latency, especially with any wireless networking involved. If for example, Computer A is streaming sensor data to computer B, which then needs to compute trajectories, state-estimations, obstacles, etc, then send computer A commands, That is simply bad architecture. The latency will cause problems. It's like trying to drive a car with your eyes shut for 9 seconds out of 10.

ChuiV gravatar imageChuiV ( 2019-06-26 09:03:57 -0500 )edit

That is simply bad architecture.

@ChuiV: I believe your statement should be nuanced a bit: there are plenty of reasons to distribute control like this, and in a properly configured setup, the distribution you describe is more than reasonable.

Using wireless connections for all this may indeed not be a good idea. That I agree with.

gvdhoorn gravatar imagegvdhoorn ( 2019-06-26 09:08:08 -0500 )edit

Agreed. Thanks for fleshing that thought out a bit more. However I will still say, that the closer sensor processing can be done to the sensor (ie preferable on the same machine as the sensor driver) the better off one would be.

ChuiV gravatar imageChuiV ( 2019-06-26 09:14:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-06-24 22:21:04 -0500

Seen: 18 times

Last updated: Jun 25