ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
The awesome Remo from MathWorks helped me through this process however it involves modifying the Matlab ROS Toolbox.
Enter edit robotics.ros.ServiceServer
to open the ServiceServer.m file in your editor.
Search for the following line (should be on or around line 173):
obj.ResponseBuilder = com.mathworks.toolbox.robotics.ros.service.ServiceResponseBuilder;
You can now manually change the default timeout to a value other than 10 seconds by adding additional code. If you want your default timeout to be 2 minutes (120 seconds), add the following line:
obj.ResponseBuilder.setTimeout(120000);
Save the file and execute
rehash toolboxcache
Restart Matlab. After that, your service server should wait longer before returning a timeout message.
2 | No.2 Revision |
Hi,
The awesome Remo from MathWorks helped me through this process however it involves modifying the Matlab ROS Toolbox.
Enter edit robotics.ros.ServiceServer
to open the ServiceServer.m file in your editor.
Search for the following line (should be on or around line 173):
obj.ResponseBuilder = com.mathworks.toolbox.robotics.ros.service.ServiceResponseBuilder;
You can now manually change the default timeout to a value other than 10 seconds by adding additional code. If you want your default timeout to be 2 minutes (120 seconds), add the following line:
obj.ResponseBuilder.setTimeout(120000);
Save the file and execute
rehash toolboxcache
Restart Matlab. After that, your service server should wait longer before returning a timeout message. Given extra effort you can probably break this out as an input argument when setting up the service server.