Skip to content

Commit ab9af49

Browse files
committed
Fixed ros service call parameter order. Now the parameters are transmitted by name instead of array order.
1 parent 55d35ac commit ab9af49

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

build/roslib.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -724,16 +724,11 @@ ROSLIB.Service.prototype.callService = function(request, callback, failedCallbac
724724
}
725725
});
726726

727-
var requestValues = [];
728-
Object.keys(request).forEach(function(name) {
729-
requestValues.push(request[name]);
730-
});
731-
732727
var call = {
733728
op : 'call_service',
734729
id : serviceCallId,
735730
service : this.name,
736-
args : requestValues
731+
args : request
737732
};
738733
this.ros.callOnConnection(call);
739734
};

0 commit comments

Comments
 (0)