Add safety controller status

This commit is contained in:
David Walsh
2019-04-19 18:29:16 -04:00
parent 365a4bb790
commit a6a0343154
2 changed files with 55 additions and 15 deletions

View File

@@ -60,6 +60,28 @@ modeStatus.subscribe(function(message) {
}
});
// Safety Status
var safetyStatusTopic = new ROSLIB.Topic({
ros : ros,
name : '/aescape/mode/safety_status',
messageType : 'std_msgs/String',
throttle_rate : 500 // 2Hz
});
safetyStatusTopic.subscribe(function(message) {
document.getElementById("safetyRunning").className = 'label-default';
document.getElementById("safetyStopped").className = 'label-default';
if (message.data == "stopped")
{
document.getElementById("safetyStopped").className = 'label-danger';
}
else if (message.data == "running")
{
document.getElementById("safetyRunning").className = 'label-success';
}
});
// Recording Bag
var recordingBagTopic = new ROSLIB.Topic({