Time required by ros communication between 2 nodes
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?
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...