Timeout error in service defined in matlab
Hi all!
I am using ROS support from MATLAB, and came across an issue which seems strange to me, and would really appreciate your input on this. In short, I am creating a service (and its callback) from within MATLAB and every time I call this service and the callback lasts for more than a few seconds the caller receives the following error message: "The service server returned an error: "A timeout occurred while waiting for a response of the service server.". This behavior is the same if the service is called from MATLAB, python, C++ or shell.
This seems strange to me as there is no timeout defined anywhere in my code, neither anywhere in the caller. Does anyone came across a similar issue? Thanks in advance!
This is not an answer, more a remark, but in general it's considered bad practice to have service calls take longer than
<insert arbitrary max length>
here. For long running operations, it's recommended to use actions. Not sure whether matlab supports those though.Thanks for your comment, gvdhoorn. It is important to know that. Indeed, matlab currently does not support actions, thus we must rely on services.
Hi musiv, Did you happen to find a resolution for this at all? I am having the same issue. Thanks, James
jsergeant, I didn't. As far as I remember, this behavior is hardcoded somewhere in the java code that implements ROS functionalities in Matlab. My workaround was to implement one service on the server that receives the original service request, and other in the caller that receives the response info