From e85717fa9fc74930eb7957cf819172c9b702549f Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 28 Mar 2019 11:26:45 -0400 Subject: [PATCH 1/2] Remove dataDisplay --- data_display/data_display.html | 58 ---------------------------------- index.html | 45 ++++++++++---------------- 2 files changed, 17 insertions(+), 86 deletions(-) diff --git a/data_display/data_display.html b/data_display/data_display.html index 4cba54d..b1396b2 100644 --- a/data_display/data_display.html +++ b/data_display/data_display.html @@ -42,61 +42,3 @@ - - - - - - - - - -
- -
- Example Pannel Heading -
- - -
- - -
-
- -
-
-
-
- No data recieved yet.
-
-
-
-
-
- - - - - -
-
- Camera Image -
-
-
- No Camera Image -
-
-
- - diff --git a/index.html b/index.html index af0e5b8..633b081 100644 --- a/index.html +++ b/index.html @@ -29,15 +29,6 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp - - - - - + + + + +
@@ -61,37 +61,26 @@ Tutorials can be found here: http://www.w3schools.com/bootstrap/default.asp Not Connected -
  • Coordinator
  • +
  • + + Vision + +
  • -
    - - - -
    - - -
    - - -
    - -
    - +
    +
    +
    From 5f2b9f8d18c609b52bddc6b0bbe1ae67805a7af1 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Thu, 28 Mar 2019 12:04:54 -0400 Subject: [PATCH 2/2] Added robot state indicators --- coordinator/coordinator.html | 36 ++++++++++++++++++++- coordinator/js/ros_scripts.js | 61 ++++++++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 5 deletions(-) diff --git a/coordinator/coordinator.html b/coordinator/coordinator.html index 75e0190..a105b88 100644 --- a/coordinator/coordinator.html +++ b/coordinator/coordinator.html @@ -20,12 +20,46 @@
    - Hardware Commands + Franka Arm Status
    +
    + Current Robot Status: + +
    +

    Other

    +
    +
    +

    Idle

    +
    +
    +

    Move

    +
    +
    +

    Guiding

    +
    +
    +

    Reflex

    +
    +
    +

    User Stopped

    +
    +
    +

    Automatic Error Recovery

    +
    +
    +
    +
    +
    +
    + Hardware Commands +
    +
    diff --git a/coordinator/js/ros_scripts.js b/coordinator/js/ros_scripts.js index 1233562..3702390 100644 --- a/coordinator/js/ros_scripts.js +++ b/coordinator/js/ros_scripts.js @@ -30,15 +30,15 @@ modeStatus.subscribe(function(message) { document.getElementById("executionModeButton").className = "btn btn-primary" - if (message.data === "stopped") { + if (message.data == "stopped") { document.getElementById("stoppedModeButton").className = "btn btn-warning" - } else if (message.data === "standby") + } else if (message.data == "standby") { document.getElementById("standbyModeButton").className = "btn btn-primary btn-success" - } else if (message.data === "teach") + } else if (message.data == "teach") { document.getElementById("teachingModeButton").className = "btn btn-primary btn-success" - } else if (message.data === "execution") + } else if (message.data == "execution") { document.getElementById("executionModeButton").className = "btn btn-primary btn-success" } @@ -55,7 +55,60 @@ bagPlayingTopic.subscribe(function(message) { document.getElementById("bagPlayingText").innerHTML = message.data }); +// FrankaState +var frankaStatus = new ROSLIB.Topic({ + ros : ros, + name : '/franka_state_controller/franka_states', + messageType : 'franka_msgs/FrankaState' +}); +frankaStatus.subscribe(function(message) { + document.getElementById("frankaModeOther").className = "label label-default" + document.getElementById("frankaModeIdle").className = "label label-default" + document.getElementById("frankaModeMove").className = "label label-default" + document.getElementById("frankaModeGuiding").className = "label label-default" + document.getElementById("frankaModeReflex").className = "label label-default" + document.getElementById("frankaModeUserStopped").className = "label label-default" + document.getElementById("frankaModeErrorRecovery").className = "label label-default" + document.getElementById("fixFrankaButton").className = "btn btn-primary" + + if (message.robot_mode == 0) + { + document.getElementById("frankaModeOther").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-danger" + } + else if (message.robot_mode == 1) + { + document.getElementById("frankaModeIdle").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-danger" + } + else if (message.robot_mode == 2) + { + document.getElementById("frankaModeMove").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-success" + } + else if (message.robot_mode == 3) + { + document.getElementById("frankaModeGuiding").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-default" + } + else if (message.robot_mode == 4) + { + document.getElementById("frankaModeReflex").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-danger" + + } + else if (message.robot_mode == 5) + { + document.getElementById("frankaModeUserStopped").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-default" + } + else if (message.robot_mode == 6) + { + document.getElementById("frankaModeErrorRecovery").className = "label label-warning" + document.getElementById("fixFrankaButton").className = "btn btn-default" + } +}); //////////////////////////////////////////////////////////////// // Services