- Example Pannel Heading
+ Example Pannel Heading My Changes
diff --git a/include/js/ros_scripts.js b/ProjectFiles/js/ros_scripts.js
similarity index 88%
rename from include/js/ros_scripts.js
rename to ProjectFiles/js/ros_scripts.js
index fe88ebc..7cb83b4 100644
--- a/include/js/ros_scripts.js
+++ b/ProjectFiles/js/ros_scripts.js
@@ -66,6 +66,23 @@ function getTopics() {
return ros.topics
};
+function getNodes() {
+
+ var topicsClient = new ROSLIB.Service({
+ ros : ros,
+ name : '/rosapi/nodes',
+ serviceType : '/rosapi/nodes'
+ });
+
+ var request = new ROSLIB.ServiceRequest();
+
+ topicsClient.callService(request, function(result) {
+ ros.nodes = result.nodes;
+ });
+
+ return ros.nodes
+};
+
function getTime() {
var topicsClient = new ROSLIB.Service({
diff --git a/include/js/update_guis.js b/ProjectFiles/js/update_guis.js
similarity index 86%
rename from include/js/update_guis.js
rename to ProjectFiles/js/update_guis.js
index 09dce81..1d966d2 100644
--- a/include/js/update_guis.js
+++ b/ProjectFiles/js/update_guis.js
@@ -50,8 +50,25 @@ function updateTopicsGUI()
};
+function updateNodesGUI()
+{
+
+ nodes = getNodes()
+ if(nodes != null){
+ var innerHTML = "";
+ for (var i = 0; i < nodes.length; i++ )
+ {
+ innerHTML = innerHTML.concat(nodes[i]);
+ innerHTML = innerHTML.concat("
"); + } + document.getElementById("ROSNodes").innerHTML = innerHTML; + } + +}; + window.setInterval(function(){ updateTopicsGUI() + updateNodesGUI() }, 500); function validateForm() diff --git a/index.html b/index.html index bbb3ef2..572f3d8 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ @@ -27,15 +27,15 @@ - - + + - + @@ -84,15 +84,15 @@
@@ -100,7 +100,6 @@
"); + } + document.getElementById("ROSNodes").innerHTML = innerHTML; + } + +}; + window.setInterval(function(){ updateTopicsGUI() + updateNodesGUI() }, 500); function validateForm() diff --git a/index.html b/index.html index bbb3ef2..572f3d8 100644 --- a/index.html +++ b/index.html @@ -19,7 +19,7 @@ @@ -27,15 +27,15 @@ - - + + - + @@ -84,15 +84,15 @@
-
+
ROS Topics
@@ -112,6 +111,19 @@