Add execution and recording status.

This commit is contained in:
David Walsh
2019-04-16 18:23:23 -04:00
parent 2687f2e4de
commit e0fe291366
2 changed files with 62 additions and 4 deletions

View File

@@ -84,6 +84,11 @@
Teaching Mode Operations Teaching Mode Operations
</div> </div>
<div class="panel-body text-center"> <div class="panel-body text-center">
<span class="row">
<label id="RecordingStatusLabel" class="label-warning">
Bag manager not connected!
</label>
</span>
<button id="recordingStartButton" type="button" onclick="triggerService('/aescape/bags/startTeachRecording')" class="btn btn-primary"> <button id="recordingStartButton" type="button" onclick="triggerService('/aescape/bags/startTeachRecording')" class="btn btn-primary">
Start Teach Recording Start Teach Recording
</button> </button>
@@ -97,9 +102,18 @@
<div class="panel-heading"> <div class="panel-heading">
Execution Mode Operations Execution Mode Operations
</div> </div>
<div class="panel-body text-center"> <div class="panel-body text-center">
<span class="row">
<label id="ExecutionStatusLabel" class="label-warning">
Bag manager not connected!
</label>
</span>
Last Bag Playing: Last Bag Playing:
<span id="bagPlayingText"> <span id="lastbagText">
None None
</span> </span>
<div> <div>
@@ -124,6 +138,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- </div> -->
</div> </div>
</div> </div>

View File

@@ -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({ var bagPlayingTopic = new ROSLIB.Topic({
ros : ros, ros : ros,
name : '/aescape/bags/playing', name : '/aescape/bags/last_played',
messageType : 'std_msgs/String' messageType : 'std_msgs/String'
}); });
bagPlayingTopic.subscribe(function(message) { bagPlayingTopic.subscribe(function(message) {
document.getElementById("bagPlayingText").innerHTML = message.data document.getElementById("lastbagText").innerHTML = message.data
}); });
// FrankaState // FrankaState