added sorting to list of nodes and topics

This commit is contained in:
Glen Turner
2015-06-10 18:27:56 -04:00
parent a8a272919b
commit 93d9eb5bb9
5 changed files with 18 additions and 26 deletions

View File

@@ -6,7 +6,7 @@ ros.nodes = [];
ros.recording = false; 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. // If there is an error on the backend, an 'error' emit will be emitted.
ros.on('error', function(error) { ros.on('error', function(error) {

View File

@@ -38,6 +38,7 @@ function updateTopicsGUI()
{ {
topics = getTopics() topics = getTopics()
topics.sort();
if(topics != null){ if(topics != null){
var innerHTML = ""; var innerHTML = "";
for (var i = 0; i < topics.length; i++ ) for (var i = 0; i < topics.length; i++ )
@@ -54,6 +55,7 @@ function updateNodesGUI()
{ {
nodes = getNodes() nodes = getNodes()
nodes.sort()
if(nodes != null){ if(nodes != null){
var innerHTML = ""; var innerHTML = "";
for (var i = 0; i < nodes.length; i++ ) for (var i = 0; i < nodes.length; i++ )

View File

@@ -15,6 +15,10 @@ Make sure you have the web_video_server installed:
sudo apt-get install ros-indigo-web-video-server 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. Then run the bash file in the working directory by running the following in the terminal.
bash launch.bash bash launch.bash

View File

@@ -167,7 +167,7 @@
<div class="input-group"> <div class="input-group">
<input type="text" id="ConnectionIPInput" class="form-control" placeholder="bag_filename" placeholder="No IP Address yet"> <input type="text" id="ConnectionIPInput" class="form-control" placeholder="bag_filename" placeholder="No IP Address yet">
<span class="input-group-btn"> <span class="input-group-btn">
<button id="ConnectionButton" type="button" onclick="ros.attemptConnection()"> <button id="ConnectionButton" type="button" onclick="ros.attemptConnection()" class=""btn btn-warning">
Connect Connect
<script type="text/javascript"> <script type="text/javascript">
document.getElementById("ConnectionIPInput").value = ros.connectionName; document.getElementById("ConnectionIPInput").value = ros.connectionName;

View File

@@ -1,14 +0,0 @@
#!/bin/bash
trap 'killall' INT
killall() {
trap '' INT TERM # ignore INT and TERM while shutting down
echo "**** Shutting down... ****" # added double quotes
kill -TERM 0 # fixed order, send TERM not INT
# wait
echo DONE
}
roslaunch rosbridge_GUI_example all.launch &
python -m SimpleHTTPServer 8000