Initial coordinator commit.

This commit is contained in:
David Walsh
2019-02-25 16:54:05 -05:00
parent afdb725937
commit 1f5ddc99fe
4 changed files with 131 additions and 33 deletions

View File

@@ -0,0 +1,72 @@
<div class="panel panel-default">
<div class="panel-heading">
Select Operation Mode
</div>
<div class="panel-body text-center">
<button id="teachingModeButton" type="button" onclick="triggerService('/teachingMode')" class="btn btn-lg">
Teaching Mode
</button>
<button id="executionModeButton" type="button" onclick="triggerService('/executionMode')" class="btn btn-lg">
Execution Mode
</button>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Teaching Mode Operations
</div>
<div class="panel-body text-center">
<button id="recordingStartButton" type="button" onclick="triggerService('/startTeachRecording')" class="btn btn-lg">
Start Teach Recording
</button>
<button id="recordingStopButton" type="button" onclick="triggerService('/stopTeachRecording')" class="btn btn-lg">
Stop Teach Recording
</button>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Execution Mode Operations
</div>
<div class="panel-body text-center">
<button id="executionStartButton" type="button" onclick="triggerService('/startPlayingLastRecording')" class="btn btn-lg">
Play Last Recording
</button>
<button id="executionStopButton" type="button" onclick="triggerService('/stopPlayingBag')" class="btn btn-lg">
Stop Playing Recording
</button>
<!-- <div class="row">
<div class="col-md-3">
Bagfile name must not start with "/"
<div class="input-group">
<input type="text" id="recordText" class="form-control" placeholder="bag_filename">
<span class="input-group-btn">
<button class="btn btn-lg" id="recordButton" type="button" onclick="toggleRecording()">
<span id="recordButtonText">
Start
</span>
</button>
</span>
</div>
</div>
</div> -->
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
Execution Recording Operations
</div>
<div class="panel-body text-center">
<button id="executionStartButton" type="button" onclick="triggerService('/startExecutionRecording')" class="btn btn-lg">
Start Recording Execution
</button>
<button id="executionRecordingStopButton" type="button" onclick="triggerService('/stopExecutionRecording')" class="btn btn-lg">
Stop Recording Execution
</button>
</div>
</div>

View File

@@ -0,0 +1,38 @@
///////////////////////////////////////////////////////////////////////////////////
// Publishers
///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Topics
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Subscribers
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// Services
////////////////////////////////////////////////////////////////
function triggerService(serviceName)
{
var service = new ROSLIB.Service({
ros : ros,
name : serviceName,
serviceType : 'std_srvs/Trigger'
});
var request = new ROSLIB.ServiceRequest({});
service.callService(request, function(result) {
console.log('Result for service call on '
+ serviceName
+ ': '
+ result.sum);
});
}

View File