From 93d9eb5bb9c3941a21b550ececc7c6092bc0d894 Mon Sep 17 00:00:00 2001 From: Glen Turner <8gt6@queensu.ca> Date: Wed, 10 Jun 2015 18:27:56 -0400 Subject: [PATCH] added sorting to list of nodes and topics --- ProjectFiles/js/ros_scripts.js | 8 ++++---- ProjectFiles/js/update_guis.js | 2 ++ README.md | 4 ++++ index.html | 16 ++++++++-------- launch.bash~ | 14 -------------- 5 files changed, 18 insertions(+), 26 deletions(-) delete mode 100644 launch.bash~ diff --git a/ProjectFiles/js/ros_scripts.js b/ProjectFiles/js/ros_scripts.js index 8de6320..0532e98 100644 --- a/ProjectFiles/js/ros_scripts.js +++ b/ProjectFiles/js/ros_scripts.js @@ -6,7 +6,7 @@ ros.nodes = []; ros.recording = false; -ros.connectionName = 'ws://192.168.0.100:9090'; +ros.connectionName = 'ws://192.168.1.105:9090'; // If there is an error on the backend, an 'error' emit will be emitted. ros.on('error', function(error) { @@ -28,11 +28,11 @@ ros.on('connection', function() { document.getElementById("ConnectionIPLabel").innerHTML = 'Connection made at:'; document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connected'; document.getElementById("ConnectionButton").className = "btn btn-success" - + ros.nodes = []; ros.topics = []; - + }); ros.on('close', function() { @@ -178,4 +178,4 @@ function toggleRecording() ros.recording = false publishBagMessage("STOP") } -} \ No newline at end of file +} diff --git a/ProjectFiles/js/update_guis.js b/ProjectFiles/js/update_guis.js index 1d966d2..f75ab30 100644 --- a/ProjectFiles/js/update_guis.js +++ b/ProjectFiles/js/update_guis.js @@ -38,6 +38,7 @@ function updateTopicsGUI() { topics = getTopics() + topics.sort(); if(topics != null){ var innerHTML = ""; for (var i = 0; i < topics.length; i++ ) @@ -54,6 +55,7 @@ function updateNodesGUI() { nodes = getNodes() + nodes.sort() if(nodes != null){ var innerHTML = ""; for (var i = 0; i < nodes.length; i++ ) diff --git a/README.md b/README.md index f0585e1..bb1272e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ Make sure you have the web_video_server installed: sudo apt-get install ros-indigo-web-video-server +Make sure you have ROSBridge installed: + + sudo apt-get install ros-indigo-rosbridge-suite + Then run the bash file in the working directory by running the following in the terminal. bash launch.bash diff --git a/index.html b/index.html index 7175713..fe875ec 100644 --- a/index.html +++ b/index.html @@ -44,7 +44,7 @@