diff --git a/coordinator/coordinator.html b/coordinator/coordinator.html index 6f90ae4..e999d50 100644 --- a/coordinator/coordinator.html +++ b/coordinator/coordinator.html @@ -20,10 +20,10 @@ Hardware Commands
- -
@@ -57,11 +57,11 @@
Bagfile name must not start with "/"
- + - diff --git a/coordinator/js/ros_scripts.js b/coordinator/js/ros_scripts.js index 2ec4233..79ec1cf 100644 --- a/coordinator/js/ros_scripts.js +++ b/coordinator/js/ros_scripts.js @@ -57,6 +57,29 @@ function triggerService(serviceName) var request = new ROSLIB.ServiceRequest({}); + service.callService(request, function(result) { + console.log('Result for service call on ' + + serviceName + + ': ' + + result.sum); + }); +} + + +function triggerMessageService(serviceName, textInput) +{ + var text = document.getElementById(textInput).value + + var service = new ROSLIB.Service({ + ros : ros, + name : serviceName, + serviceType : 'demobot.TriggerMessage' + }); + + var request = new ROSLIB.ServiceRequest({ + message : text + }); + service.callService(request, function(result) { console.log('Result for service call on ' + serviceName