From 943faa48f091e79bd9edd6da04538434f3c6bf61 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 19 Sep 2023 14:09:14 +0200 Subject: [PATCH] Franka added --- InteractiveBO/src/components/PolicyPlot.vue | 91 ++++++++++++------- InteractiveBO/src/components/RosBar.vue | 2 + InteractiveBO/src/components/WeightTuner.vue | 7 +- .../src/components/WeightTunerVertical.vue | 7 +- InteractiveBO/src/store/ControlStore.js | 12 ++- InteractiveBO/src/store/PolicyStore.js | 1 + 6 files changed, 82 insertions(+), 38 deletions(-) diff --git a/InteractiveBO/src/components/PolicyPlot.vue b/InteractiveBO/src/components/PolicyPlot.vue index f059120..bef84ee 100644 --- a/InteractiveBO/src/components/PolicyPlot.vue +++ b/InteractiveBO/src/components/PolicyPlot.vue @@ -5,45 +5,25 @@ diff --git a/InteractiveBO/src/components/RosBar.vue b/InteractiveBO/src/components/RosBar.vue index a4f2f35..f19e4b6 100644 --- a/InteractiveBO/src/components/RosBar.vue +++ b/InteractiveBO/src/components/RosBar.vue @@ -153,6 +153,7 @@ active_rl_eval_sub.subscribe((msg) => { const weights_x = msg.weights.slice(0, nr_weights); const weights_y = msg.weights.slice(nr_weights); + pstore.setTrigger(); pstore.setPolicy(pol_x); pstore.setPolicy_y(pol_y); pstore.setWeights(weights_x); @@ -210,6 +211,7 @@ active_bo_response.subscribe((msg) => { pstore.setPolicy(pol_x); pstore.setPolicy_y(pol_y); + pstore.setTrigger(); pstore.setWeights(weights_x); pstore.setWeights_y(weights_y); rstore.setMean(msg.reward_mean); diff --git a/InteractiveBO/src/components/WeightTuner.vue b/InteractiveBO/src/components/WeightTuner.vue index 01f1767..84f36d2 100644 --- a/InteractiveBO/src/components/WeightTuner.vue +++ b/InteractiveBO/src/components/WeightTuner.vue @@ -9,9 +9,10 @@ @change="updateWeight(idx, $event)" direction="btt" :height="100" - :min="-1" - :max="1" + :min="cstore.bounds[cstore.env][0]" + :max="cstore.bounds[cstore.env][2]" :interval="0.01" + :disabled="idx === 0" /> import { usePStore } from "@/store/PolicyStore"; +import { useCStore } from "@/store/ControlStore"; import VueSlider from "vue-slider-component"; import "vue-slider-component/theme/default.css"; import { computed } from "vue"; const store = usePStore(); +const cstore = useCStore(); const weights = computed({ get: () => store.weights, diff --git a/InteractiveBO/src/components/WeightTunerVertical.vue b/InteractiveBO/src/components/WeightTunerVertical.vue index 85cbaed..ce7bdd8 100644 --- a/InteractiveBO/src/components/WeightTunerVertical.vue +++ b/InteractiveBO/src/components/WeightTunerVertical.vue @@ -13,10 +13,11 @@ v-model="weights_y[idx]" @change="updateWeight(idx, $event)" direction="ltr" - :min="-1" - :max="1" + :min="cstore.bounds[cstore.env][1]" + :max="cstore.bounds[cstore.env][3]" :interval="0.01" :style="{}" + :disabled="idx === 0" /> @@ -34,12 +35,14 @@