Time required by ros communication between 2 nodes

asked 2019-03-25 16:03:30 -0500

debonair gravatar image

updated 2019-03-25 16:55:56 -0500

I am doing some performance evaluation for time required by ros transport layer. The way I am doing calculation is, I call

Send(){
high_resolution_clock::time_point t1 = high_resolution_clock::now();
publish() // publish ros message. 
}

Callback(MsgType msg){
high_resolution_clock::time_point t2 = high_resolution_clock::now();
auto duration = duration_cast<microseconds>( t2 - t1 ).count();
}

Whatever the size of the published message is, duration does not change, it is always around 2.2 micro-seconds. Even if I try to publish blank message, it is same. Why so? Does ros-split the message into multiple chunks while sending?

edit retag flag offensive close merge delete

Comments

2

You've left out a lot of critical details that will affect latency. Please re-read my answer on https://answers.ros.org/question/3154...

ahendrix gravatar image ahendrix  ( 2019-03-25 17:18:42 -0500 )edit