From 0cc4dc6a83decd1d35a8b0bbc91e99abeca8b423 Mon Sep 17 00:00:00 2001 From: "nikolaus.feith" Date: Mon, 27 Feb 2023 16:49:09 +0100 Subject: [PATCH] start working on ControlPanel.vue --- ActiveBOWeb/src/components/ControlPanel.vue | 49 +++++++++++++++++++++ ActiveBOWeb/src/components/RewardPlot.vue | 10 ++--- ActiveBOWeb/src/components/RosBar.vue | 16 ++++++- ActiveBOWeb/src/components/SubLayout.vue | 4 +- ActiveBOWeb/src/rosInterfaces/policy_srv.js | 18 ++++++++ ActiveBOWeb/src/store/ControlStore.js | 42 ++++++++++++++++++ ActiveBOWeb/src/store/PolicyStore.js | 16 ++++--- ActiveBOWeb/src/store/RewardStore.js | 9 +--- 8 files changed, 144 insertions(+), 20 deletions(-) create mode 100644 ActiveBOWeb/src/components/ControlPanel.vue create mode 100644 ActiveBOWeb/src/rosInterfaces/policy_srv.js create mode 100644 ActiveBOWeb/src/store/ControlStore.js diff --git a/ActiveBOWeb/src/components/ControlPanel.vue b/ActiveBOWeb/src/components/ControlPanel.vue new file mode 100644 index 0000000..cd9aef3 --- /dev/null +++ b/ActiveBOWeb/src/components/ControlPanel.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/ActiveBOWeb/src/components/RewardPlot.vue b/ActiveBOWeb/src/components/RewardPlot.vue index bc1fe2b..2782851 100644 --- a/ActiveBOWeb/src/components/RewardPlot.vue +++ b/ActiveBOWeb/src/components/RewardPlot.vue @@ -17,8 +17,8 @@ const store = useRStore(); let chartHandle; function buildChart() { - const reward_mean = store.getMean(); - const reward_std = store.getStd(); + const reward_mean = store.getMean; + const reward_std = store.getStd; const upper_bound = Array(reward_mean.length).fill(0).map((_, i) => reward_mean[i] + 1.96 * reward_std[i]); const lower_bound = Array(reward_mean.length).fill(0).map((_, i) => reward_mean[i] - 1.96 * reward_std[i]); const reward_labels = Array(reward_mean.length).fill(0).map((_, i) => i); @@ -97,9 +97,9 @@ onMounted(() => { buildChart(); }); -watch(() => store.getMean(), () => { - const reward_mean = store.getMean(); - const reward_std = store.getStd(); +watch(() => store.getMean, () => { + const reward_mean = store.getMean; + const reward_std = store.getStd; const upper_bound = Array(reward_mean.length).fill(0).map((_, i) => reward_mean[i] + 1.96 * reward_std[i]); const lower_bound = Array(reward_mean.length).fill(0).map((_, i) => reward_mean[i] - 1.96 * reward_std[i]); diff --git a/ActiveBOWeb/src/components/RosBar.vue b/ActiveBOWeb/src/components/RosBar.vue index c571cc5..57f958e 100644 --- a/ActiveBOWeb/src/components/RosBar.vue +++ b/ActiveBOWeb/src/components/RosBar.vue @@ -25,13 +25,16 @@ diff --git a/ActiveBOWeb/src/components/SubLayout.vue b/ActiveBOWeb/src/components/SubLayout.vue index 73b833a..2ccde33 100644 --- a/ActiveBOWeb/src/components/SubLayout.vue +++ b/ActiveBOWeb/src/components/SubLayout.vue @@ -1,11 +1,13 @@