Occasional service call failure
There are some times that one of my service clients fails to get a response when it calls the service.
Are there any approaches or tools that can help my understanding of why this occasional failure occurs?
Both the server and client were written referring to the tutorials. They are run on the same machine and I was making calls at about 50Hz (a third node drives service calls between the client and the server and that node sends messages at 50Hz)
The error message I get is the "Failed to call the SensorService" until I abort the nodes. The messages always show up from the beginning, if they do show up. (Lending support to a start up issue, although one would think that eventually the service provider would start responding to service calls)
I reduced the loop rate to 10Hz and I haven't noticed a failed call in a while (but remember, it was occasional even at the higher loop rate). I did not use a persistent call. I just restart the launch file (a couple of times).
if (SensorClient_.call(SensorService))
{
//Let the world know
ROS_INFO("I called the SensorService!");
}
else
{
ROS_ERROR("Failed to call the SensorService");
}