Add controller mode status.
This commit is contained in:
@@ -4,13 +4,13 @@
|
|||||||
Select Operation Mode
|
Select Operation Mode
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body text-center">
|
<div class="panel-body text-center">
|
||||||
<button id="teachingModeButton" type="button" onclick="triggerService('/activateTeachingController')" class="btn btn-lg">
|
<button id="teachingModeButton" type="button" onclick="triggerService('/aescape/mode/activateTeachingController')" class="btn btn-primary">
|
||||||
Teaching Mode
|
Teaching Mode
|
||||||
</button>
|
</button>
|
||||||
<button id="executionModeButton" type="button" onclick="triggerService('/activateExecutionController')" class="btn btn-lg">
|
<button id="executionModeButton" type="button" onclick="triggerService('/aescape/mode/activateExecutionController')" class="btn btn-primary">
|
||||||
Execution Mode
|
Execution Mode
|
||||||
</button>
|
</button>
|
||||||
<button id="standbyModeButton" type="button" onclick="triggerService('/stopControllers')" class="btn btn-lg">
|
<button id="standbyModeButton" type="button" onclick="triggerService('/aescape/mode/stopControllers')" class="btn btn-primary">
|
||||||
Standby Mode
|
Standby Mode
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -20,10 +20,10 @@
|
|||||||
Hardware Commands
|
Hardware Commands
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body text-center">
|
<div class="panel-body text-center">
|
||||||
<button id="teachingModeButton" type="button" onclick="triggerService('/resetFrankaError')" class="btn btn-lg">
|
<button id="fixFrankaButton" type="button" onclick="triggerService('/resetFrankaError')" class="btn btn-primary">
|
||||||
Fix Franka Errors
|
Fix Franka Errors
|
||||||
</button>
|
</button>
|
||||||
<button id="executionModeButton" type="button" onclick="triggerService('/calibrateRobotiq')" class="btn btn-lg">
|
<button id="calibrateButton" type="button" onclick="triggerService('/calibrateRobotiq')" class="btn btn-primary">
|
||||||
Calibrate Robotiq
|
Calibrate Robotiq
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,10 +33,10 @@
|
|||||||
Teaching Mode Operations
|
Teaching Mode Operations
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body text-center">
|
<div class="panel-body text-center">
|
||||||
<button id="recordingStartButton" type="button" onclick="triggerService('/startTeachRecording')" class="btn btn-lg">
|
<button id="recordingStartButton" type="button" onclick="triggerService('/startTeachRecording')" class="btn btn-primary">
|
||||||
Start Teach Recording
|
Start Teach Recording
|
||||||
</button>
|
</button>
|
||||||
<button id="recordingStopButton" type="button" onclick="triggerService('/stopTeachRecording')" class="btn btn-lg">
|
<button id="recordingStopButton" type="button" onclick="triggerService('/stopTeachRecording')" class="btn btn-primary">
|
||||||
Stop Teach Recording
|
Stop Teach Recording
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -47,19 +47,19 @@
|
|||||||
Execution Mode Operations
|
Execution Mode Operations
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body text-center">
|
<div class="panel-body text-center">
|
||||||
<button id="executionStartButton" type="button" onclick="triggerService('/startPlayingLastRecording')" class="btn btn-lg">
|
<button id="executionStartButton" type="button" onclick="triggerService('/startPlayingLastRecording')" class="btn btn-primary">
|
||||||
Play Last Recording
|
Play Last Recording
|
||||||
</button>
|
</button>
|
||||||
<button id="executionStopButton" type="button" onclick="triggerService('/stopPlayingBag')" class="btn btn-lg">
|
<button id="executionStopButton" type="button" onclick="triggerService('/stopPlayingBag')" class="btn btn-primary">
|
||||||
Stop Playing Recording
|
Stop Playing Recording
|
||||||
</button>
|
</button>
|
||||||
<!-- <div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
Bagfile name must not start with "/"
|
Bagfile name must not start with "/"
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" id="recordText" class="form-control" placeholder="bag_filename">
|
<input type="text" id="recordText" class="form-control" placeholder="bag_filename">
|
||||||
<span class="input-group-btn">
|
<span class="input-group-btn">
|
||||||
<button class="btn btn-lg" id="recordButton" type="button" onclick="toggleRecording()">
|
<button class="btn btn-primary" id="recordButton" type="button" onclick="toggleRecording()">
|
||||||
<span id="recordButtonText">
|
<span id="recordButtonText">
|
||||||
Start
|
Start
|
||||||
</span>
|
</span>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -77,10 +77,10 @@
|
|||||||
Execution Recording Operations
|
Execution Recording Operations
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body text-center">
|
<div class="panel-body text-center">
|
||||||
<button id="executionStartButton" type="button" onclick="triggerService('/startExecutionRecording')" class="btn btn-lg">
|
<button id="executionStartButton" type="button" onclick="triggerService('/startExecutionRecording')" class="btn btn-primary">
|
||||||
Start Recording Execution
|
Start Recording Execution
|
||||||
</button>
|
</button>
|
||||||
<button id="executionRecordingStopButton" type="button" onclick="triggerService('/stopExecutionRecording')" class="btn btn-lg">
|
<button id="executionRecordingStopButton" type="button" onclick="triggerService('/stopExecutionRecording')" class="btn btn-primary">
|
||||||
Stop Recording Execution
|
Stop Recording Execution
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Publishers
|
// Publishers
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -8,10 +11,35 @@
|
|||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
// Subscribers
|
// 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