Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
* Fixed missing AcutationRequest message
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berger <christian.berger@gu.se>
  • Loading branch information
chrberger committed Sep 28, 2018
1 parent 372ebbd commit 70621bb
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
24 changes: 24 additions & 0 deletions webapp/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,30 @@ function setupUI() {
$("#connectionStatusText").html("OpenDLV Vehicle View (connected)");

var odvd = getResourceFrom(ODVD_FILE);
{
// Always add the messages to control the remote player and to actuation request.
var playerMessages = `
message cluon.data.PlayerCommand [id = 9] {
uint8 command [id = 1]; // 0 = nothing, 1 = play, 2 = pause, 3 = seekTo, 4 = step
float seekTo [id = 2];
}
message cluon.data.PlayerStatus [id = 10] {
uint8 state [id = 1]; // 0 = unknown, 1 = loading file, 2 = playback
uint32 numberOfEntries [id = 2];
uint32 currentEntryForPlayback [id = 3];
}
// This message is a legacy one to support controlling Snowfox and Rhino.
message opendlv.proxy.ActuationRequest [id = 160] {
float acceleration [id = 1];
float steering [id = 2];
bool isValid [id = 3];
}
`;
odvd += playerMessages;
}
console.log("Loaded " + g_libcluon.setMessageSpecification(odvd) + " messages from specification '" + ODVD_FILE + "'.");

// Establish WebRTC connection (only when we are not running locally).
Expand Down
13 changes: 13 additions & 0 deletions webapp/views/joystick.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,19 @@
document.getElementById("connectionStatusText").innerHTML = "connected";
var odvd = getResourceFrom("opendlv-standard-message-set-v0.9.7.odvd");
{
// Always add the messages to control the player.
var actuationRequestMessage = `
// This message is a legacy one to support controlling Snowfox and Rhino.
message opendlv.proxy.ActuationRequest [id = 160] {
float acceleration [id = 1];
float steering [id = 2];
bool isValid [id = 3];
}
`;
odvd += actuationRequestMessage;
}
console.log("Loaded " + __libcluon.setMessageSpecification(odvd) + " messages from specification.");
};
Expand Down
2 changes: 1 addition & 1 deletion webapp/views/main.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<div class="col-md-12">
<br>
<center>
<i id="connectionStatusSymbol" class="fa fa-taxi" style="font-size:30px;color:#555" title="OpenDLV Vehicle View - v0.0.39"></i>
<i id="connectionStatusSymbol" class="fa fa-taxi" style="font-size:30px;color:#555" title="OpenDLV Vehicle View - v0.0.40"></i>
<div id="connectionStatusText">OpenDLV Vehicle View (disconnected)</div>
</center>
</div>
Expand Down
9 changes: 8 additions & 1 deletion webapp/views/recordings.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function toggleMessageViewFromTop() {
var __libcluon = libcluon();
var res = "0";
try {
// Always add the messages to control the player.
// Always add the messages to control the remote player and to actuation request.
var playerMessages = `
message cluon.data.PlayerCommand [id = 9] {
Expand All @@ -212,6 +212,13 @@ message cluon.data.PlayerStatus [id = 10] {
uint32 numberOfEntries [id = 2];
uint32 currentEntryForPlayback [id = 3];
}
// This message is a legacy one to support controlling Snowfox and Rhino.
message opendlv.proxy.ActuationRequest [id = 160] {
float acceleration [id = 1];
float steering [id = 2];
bool isValid [id = 3];
}
`;
content += playerMessages;
res = __libcluon.setMessageSpecification(content);
Expand Down

0 comments on commit 70621bb

Please sign in to comment.