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.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")
}
}
}

View File

@@ -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++ )

View File

@@ -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

View File

@@ -44,7 +44,7 @@
</a>
</li>
<li> <a href="#rosbridgeconnection" data-toggle="tab">
ROS Bridge Connection
ROS Bridge Connection
<span id="rosbridgeconnection_badge" class="badge">
Not Connected
</span></a></li>
@@ -99,8 +99,8 @@
<div class="panel-body">
<div class="row">
<label class="col-sm-2">
Bar Title
<label class="col-sm-2">
Bar Title
</label>
<div class="progress">
@@ -112,8 +112,8 @@
<div class="row">
<label class="col-sm-2">
Up Time (s):
<label class="col-sm-2">
Up Time (s):
</label>
<div class="col-sm-1" id="UpTime">
@@ -121,7 +121,7 @@
</div>
</div>
</div>
@@ -159,7 +159,7 @@
<div id="ConnectionIPForm" class="form-group has-warning" align="center">
<span>
<label id="ConnectionIPLabel" class="control-label" for="inputWarning">
Connection Warning
Connection Warning
</label>
</span>
@@ -167,7 +167,7 @@
<div class="input-group">
<input type="text" id="ConnectionIPInput" class="form-control" placeholder="bag_filename" placeholder="No IP Address yet">
<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
<script type="text/javascript">
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