diff --git a/coordinator/coordinator.html b/coordinator/coordinator.html index 2f88272..7a482b9 100644 --- a/coordinator/coordinator.html +++ b/coordinator/coordinator.html @@ -84,6 +84,11 @@ Teaching Mode Operations
+ + + @@ -97,9 +102,18 @@
Execution Mode Operations
+ +
+ + + + + Last Bag Playing: - + None
@@ -124,6 +138,8 @@
+ + diff --git a/coordinator/js/ros_scripts.js b/coordinator/js/ros_scripts.js index e7bf2d9..f761d76 100644 --- a/coordinator/js/ros_scripts.js +++ b/coordinator/js/ros_scripts.js @@ -45,15 +45,57 @@ modeStatus.subscribe(function(message) { } }); -// Playing Bag + +// Recording Bag +var recordingBagTopic = new ROSLIB.Topic({ + ros : ros, + name : '/aescape/bags/recording_status', + messageType : 'std_msgs/String' +}); + +recordingBagTopic.subscribe(function(message) { + if (message.data == "stopped") + { + document.getElementById("RecordingStatusLabel").innerHTML = 'Not Running'; + document.getElementById("RecordingStatusLabel").className = 'label-warning'; + } + else if (message.data == "running") + { + document.getElementById("RecordingStatusLabel").innerHTML = 'RUNNING!'; + document.getElementById("RecordingStatusLabel").className = 'label-success'; + } +}); + +// Executing Bag +var executingBagTopic = new ROSLIB.Topic({ + ros : ros, + name : '/aescape/bags/execution_status', + messageType : 'std_msgs/String' +}); + +executingBagTopic.subscribe(function(message) { + if (message.data == "stopped") + { + document.getElementById("ExecutionStatusLabel").innerHTML = 'Not Running'; + document.getElementById("ExecutionStatusLabel").className = 'label-warning'; + } + else if (message.data == "running") + { + document.getElementById("ExecutionStatusLabel").innerHTML = 'RUNNING!'; + document.getElementById("ExecutionStatusLabel").className = 'label-success'; + } +}); + + +// Last Bag var bagPlayingTopic = new ROSLIB.Topic({ ros : ros, - name : '/aescape/bags/playing', + name : '/aescape/bags/last_played', messageType : 'std_msgs/String' }); bagPlayingTopic.subscribe(function(message) { - document.getElementById("bagPlayingText").innerHTML = message.data + document.getElementById("lastbagText").innerHTML = message.data }); // FrankaState