diff --git a/backend/js/ros_scripts.js b/backend/js/ros_scripts.js index 59078dc..c41ec39 100644 --- a/backend/js/ros_scripts.js +++ b/backend/js/ros_scripts.js @@ -155,3 +155,22 @@ function toggleRecording() } } } + + +function getMasterName() +{ + var service = new ROSLIB.Service({ + ros : ros, + name : '/rosapi/service_host', + serviceType : 'rosapi/ServiceHost' + }); + + var request = new ROSLIB.ServiceRequest({ + service: '/rosout/get_loggers' // Only the master hosts this service. + }); + + service.callService(request, function(result) { + console.log('Master Name = ' + result.host); + document.getElementById("MasterName").innerHTML = result.host; + }); +} diff --git a/index.html b/index.html index 4324966..d38d517 100644 --- a/index.html +++ b/index.html @@ -64,26 +64,39 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp