File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,10 @@ export default class Service extends EventEmitter {
45
45
* @param {TRequest } request - The service request to send.
46
46
* @param {callServiceCallback } [callback] - Function with the following params:
47
47
* @param {callServiceFailedCallback } [failedCallback] - The callback function when the service call failed with params:
48
- */
49
- callService ( request , callback , failedCallback ) {
48
+ * @param {number } [timeout] - Optional timeout, in seconds, for the service call. A non-positive value means no timeout.
49
+ * If not provided, the rosbridge server will use its default value.
50
+ */
51
+ callService ( request , callback , failedCallback , timeout ) {
50
52
if ( this . isAdvertised ) {
51
53
return ;
52
54
}
@@ -71,8 +73,10 @@ export default class Service extends EventEmitter {
71
73
id : serviceCallId ,
72
74
service : this . name ,
73
75
type : this . serviceType ,
74
- args : request
76
+ args : request ,
77
+ timeout : timeout
75
78
} ;
79
+
76
80
this . ros . callOnConnection ( call ) ;
77
81
}
78
82
/**
You can’t perform that action at this time.
0 commit comments