From e66cea7aa24d94966756e5ca9c215dd8a65ff607 Mon Sep 17 00:00:00 2001
From: jcasals <jcasals@iri.upc.edu>
Date: Fri, 5 Jun 2020 12:15:13 +0200
Subject: [PATCH] [WIP] Adapt gtest .yaml files to new composite format

---
 src/problem/problem.cpp                            |  5 ++++-
 test/yaml/params_tree_manager1.yaml                | 14 +++++++++++---
 test/yaml/params_tree_manager2.yaml                | 14 +++++++++++---
 test/yaml/params_tree_manager_sliding_window1.yaml | 12 +++++++++---
 test/yaml/params_tree_manager_sliding_window2.yaml | 12 +++++++++---
 5 files changed, 44 insertions(+), 13 deletions(-)

diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp
index 7cb79904d..ef1f8b5bc 100644
--- a/src/problem/problem.cpp
+++ b/src/problem/problem.cpp
@@ -186,7 +186,10 @@ ProblemPtr Problem::autoSetup(ParamsServer &_server)
         problem->setPriorOptions(prior_mode,
                                  _server.getParam<double>("problem/prior/time_tolerance"),
                                  _server.getParam<VectorComposite>("problem/prior/state"),
-                                 _server.getParam<VectorComposite>("problem/prior/cov"));
+                                 _server.getParam<VectorComposite>("problem/prior/sigma"));
+
+
+
     }
     else
     {
diff --git a/test/yaml/params_tree_manager1.yaml b/test/yaml/params_tree_manager1.yaml
index 085015b89..0bd680c84 100644
--- a/test/yaml/params_tree_manager1.yaml
+++ b/test/yaml/params_tree_manager1.yaml
@@ -4,8 +4,16 @@ config:
     dimension: 3
     prior:
       mode: "factor"
-      state: [0,0,0,0,0,0,1,0,0,0]
-      cov: [[9,9],.1,0,0,0,0,0,0,0,0, 0,.1,0,0,0,0,0,0,0, 0,0,.1,0,0,0,0,0,0, 0,0,0,.1,0,0,0,0,0, 0,0,0,0,.1,0,0,0,0, 0,0,0,0,0,.1,0,0,0, 0,0,0,0,0,0,.1,0,0, 0,0,0,0,0,0,0,.1,0, 0,0,0,0,0,0,0,0,.1]
+      # state: [0,0,0,0,0,0,1,0,0,0]
+      # cov: [[9,9],.1,0,0,0,0,0,0,0,0, 0,.1,0,0,0,0,0,0,0, 0,0,.1,0,0,0,0,0,0, 0,0,0,.1,0,0,0,0,0, 0,0,0,0,.1,0,0,0,0, 0,0,0,0,0,.1,0,0,0, 0,0,0,0,0,0,.1,0,0, 0,0,0,0,0,0,0,.1,0, 0,0,0,0,0,0,0,0,.1]
+      $state:
+        P: [0,0,0]
+        O: [0,0,0,1]
+        V: [0,0,0]
+      $sigma:
+        P: [0.31]
+        O: [0.31]
+        V: [0.31]
       time_tolerance: 0.1
     tree_manager:
       type: "TreeManagerDummy"
@@ -38,4 +46,4 @@ config:
         dist_traveled:          0.5   # meters
         angle_turned:           0.1   # radians (1 rad approx 57 deg, approx 60 deg)
       
-      unmeasured_perturbation_std: 0.00111
\ No newline at end of file
+      unmeasured_perturbation_std: 0.00111
diff --git a/test/yaml/params_tree_manager2.yaml b/test/yaml/params_tree_manager2.yaml
index 80b5af47a..70700a80f 100644
--- a/test/yaml/params_tree_manager2.yaml
+++ b/test/yaml/params_tree_manager2.yaml
@@ -4,8 +4,16 @@ config:
     dimension: 3
     prior:
       mode: "factor"
-      state: [0,0,0,0,0,0,1,0,0,0]
-      cov: [[9,9],.1,0,0,0,0,0,0,0,0, 0,.1,0,0,0,0,0,0,0, 0,0,.1,0,0,0,0,0,0, 0,0,0,.1,0,0,0,0,0, 0,0,0,0,.1,0,0,0,0, 0,0,0,0,0,.1,0,0,0, 0,0,0,0,0,0,.1,0,0, 0,0,0,0,0,0,0,.1,0, 0,0,0,0,0,0,0,0,.1]
+      # state: [0,0,0,0,0,0,1,0,0,0]
+      # cov: [[9,9],.1,0,0,0,0,0,0,0,0, 0,.1,0,0,0,0,0,0,0, 0,0,.1,0,0,0,0,0,0, 0,0,0,.1,0,0,0,0,0, 0,0,0,0,.1,0,0,0,0, 0,0,0,0,0,.1,0,0,0, 0,0,0,0,0,0,.1,0,0, 0,0,0,0,0,0,0,.1,0, 0,0,0,0,0,0,0,0,.1]
+      $state:
+        P: [0,0,0]
+        O: [0,0,0,1]
+        V: [0,0,0]
+      $sigma:
+        P: [0.31]
+        O: [0.31]
+        V: [0.31]
       time_tolerance: 0.1
     tree_manager: 
       type: "None"
@@ -37,4 +45,4 @@ config:
         dist_traveled:          0.5   # meters
         angle_turned:           0.1   # radians (1 rad approx 57 deg, approx 60 deg)
       
-      unmeasured_perturbation_std: 0.00111
\ No newline at end of file
+      unmeasured_perturbation_std: 0.00111
diff --git a/test/yaml/params_tree_manager_sliding_window1.yaml b/test/yaml/params_tree_manager_sliding_window1.yaml
index 3a0f421c5..12cbd63da 100644
--- a/test/yaml/params_tree_manager_sliding_window1.yaml
+++ b/test/yaml/params_tree_manager_sliding_window1.yaml
@@ -4,8 +4,14 @@ config:
     dimension: 3
     prior:
       mode: "factor"
-      state: [0,0,0,0,0,0,1]
-      cov: [[6,6],.1,0,0,0,0,0, 0,.1,0,0,0,0, 0,0,.1,0,0,0, 0,0,0,.1,0,0, 0,0,0,0,.1,0, 0,0,0,0,0,.1]
+      # state: [0,0,0,0,0,0,1]
+      # cov: [[6,6],.1,0,0,0,0,0, 0,.1,0,0,0,0, 0,0,.1,0,0,0, 0,0,0,.1,0,0, 0,0,0,0,.1,0, 0,0,0,0,0,.1]
+      $state:
+        P: [0,0,0]
+        O: [0,0,0,1]
+      $sigma:
+        P: [0.31]
+        O: [0.31]
       time_tolerance: 0.1
     tree_manager:
       type: "TreeManagerSlidingWindow"
@@ -40,4 +46,4 @@ config:
         dist_traveled:          0.5   # meters
         angle_turned:           0.1   # radians (1 rad approx 57 deg, approx 60 deg)
       
-      unmeasured_perturbation_std: 0.00111
\ No newline at end of file
+      unmeasured_perturbation_std: 0.00111
diff --git a/test/yaml/params_tree_manager_sliding_window2.yaml b/test/yaml/params_tree_manager_sliding_window2.yaml
index 894dadf65..687a4d375 100644
--- a/test/yaml/params_tree_manager_sliding_window2.yaml
+++ b/test/yaml/params_tree_manager_sliding_window2.yaml
@@ -4,8 +4,14 @@ config:
     dimension: 3
     prior:
       mode: "factor"
-      state: [0,0,0,0,0,0,1]
-      cov: [[6,6],.1,0,0,0,0,0, 0,.1,0,0,0,0, 0,0,.1,0,0,0, 0,0,0,.1,0,0, 0,0,0,0,.1,0, 0,0,0,0,0,.1]
+      # state: [0,0,0,0,0,0,1]
+      # cov: [[6,6],.1,0,0,0,0,0, 0,.1,0,0,0,0, 0,0,.1,0,0,0, 0,0,0,.1,0,0, 0,0,0,0,.1,0, 0,0,0,0,0,.1]
+      $state:
+        P: [0,0,0]
+        O: [0,0,0,1]
+      $sigma:
+        P: [0.31]
+        O: [0.31]
       time_tolerance: 0.1
     tree_manager:
       type: "TreeManagerSlidingWindow"
@@ -40,4 +46,4 @@ config:
         dist_traveled:          0.5   # meters
         angle_turned:           0.1   # radians (1 rad approx 57 deg, approx 60 deg)
       
-      unmeasured_perturbation_std: 0.00111
\ No newline at end of file
+      unmeasured_perturbation_std: 0.00111
-- 
GitLab