communication among multiple computers in ROS
How can I compute the time of transferring message from publisher to subscriber?
Thanks.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |
How can I compute the time of transferring message from publisher to subscriber?
Thanks.
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.
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.
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.
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.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2019-06-24 22:21:04 -0500
Seen: 185 times
Last updated: Jun 25 '19