Add Load and Play Buttons

This commit is contained in:
David Walsh
2019-05-08 13:10:03 -04:00
parent e98805e96e
commit 8af9aecfb0
2 changed files with 18 additions and 2 deletions

View File

@@ -160,7 +160,10 @@
<button type="button" onclick="triggerService('/left/aescape/mode/activateReadyController')" class="btn btn-default">
Activate Ready Mode
</button>
<button id="executionStartButton" type="button" onclick="triggerService('/left/aescape/mode/activateExecutionController'); triggerService('/aescape/bags/startPlayingLastRecording')" class="btn btn-primary">
<button id="executionLoadButton" type="button" onclick="triggerService('/aescape/bags/startPlayingLastRecording')" class="btn btn-primary">
Load Last Recording
</button>
<button id="executionStartButton" type="button" onclick="triggerService('/left/aescape/mode/activateExecutionController'); triggerTopic('/left/run_trajectory')" class="btn btn-primary">
Play Last Recording
</button>
<button id="executionStopButton" type="button" onclick="triggerService('/aescape/bags/stopPlayingBag'); triggerService('/left/aescape/mode/activateReadyController')" class="btn btn-primary">

View File

@@ -5,6 +5,18 @@
// Publishers
///////////////////////////////////////////////////////////////////////////////////
function triggerTopic(topicName)
{
var topic = new ROSLIB.Topic({
ros : ros,
name : topicName,
messageType : 'std_msgs/Empty'
});
var msg = new ROSLIB.Message({});
topic.publish(msg);
}
////////////////////////////////////////////////////////////////
// Topics
@@ -279,4 +291,5 @@ function triggerMessageService(serviceName, textInput)
+ ': '
+ result.sum);
});
}
}