Skip to content

Commit 47336fa

Browse files
Minggang Wangjihoonl
authored andcommitted
Add the type of service when executing 'call_service' (#282)
We want to reuse the roslibjs as the front-end JavaScript library by leveraging the ros2-web-bridge in ROS2. But the current roslibjs doesn't transmit the service type when calling a service, which is a necessary element when sending the request in ROS2. This patch adds this information to make it compatible with ROS2.
1 parent 3bc4ec2 commit 47336fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/Service.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Service.prototype.callService = function(request, callback, failedCallback) {
5959
op : 'call_service',
6060
id : serviceCallId,
6161
service : this.name,
62+
type: this.serviceType,
6263
args : request
6364
};
6465
this.ros.callOnConnection(call);

0 commit comments

Comments
 (0)