Add controller mode status.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Publishers
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -8,10 +11,35 @@
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Subscribers
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
// Operation Mode
|
||||
var modeStatus = new ROSLIB.Topic({
|
||||
ros : ros,
|
||||
name : '/aescape/mode/status',
|
||||
messageType : 'std_msgs/String'
|
||||
});
|
||||
|
||||
modeStatus.subscribe(function(message) {
|
||||
document.getElementById("standbyModeButton").className = "btn btn-primary"
|
||||
document.getElementById("teachingModeButton").className = "btn btn-primary"
|
||||
document.getElementById("executionModeButton").className = "btn btn-primary"
|
||||
|
||||
|
||||
if (message.data === "standby") {
|
||||
document.getElementById("standbyModeButton").className = "btn btn-success"
|
||||
} else if (message.data === "teach")
|
||||
{
|
||||
document.getElementById("teachingModeButton").className = "btn btn-primary btn-success"
|
||||
} else if (message.data === "execution")
|
||||
{
|
||||
document.getElementById("executionModeButton").className = "btn btn-primary btn-success"
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user