From 3dfafb0a98b8b5eb83e0b93123d5388a1933909c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Fri, 2 Aug 2019 20:35:26 +0200
Subject: [PATCH] simplify "sen type" / "prc type" --> "type" in YAML files

---
 demos/processor_imu.yaml         | 3 ++-
 demos/processor_imu_no_vote.yaml | 3 ++-
 demos/sensor_imu.yaml            | 3 ++-
 src/yaml/processor_IMU_yaml.cpp  | 2 +-
 src/yaml/sensor_IMU_yaml.cpp     | 2 +-
 5 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/demos/processor_imu.yaml b/demos/processor_imu.yaml
index 055909d98..405d69fca 100644
--- a/demos/processor_imu.yaml
+++ b/demos/processor_imu.yaml
@@ -1,4 +1,5 @@
-processor type: "IMU"              # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+type: "IMU"              # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+
 unmeasured perturbation std: 0.00001
 time tolerance: 0.0025         # Time tolerance for joining KFs
 keyframe vote:
diff --git a/demos/processor_imu_no_vote.yaml b/demos/processor_imu_no_vote.yaml
index 4804c9d5b..e01ed1cc4 100644
--- a/demos/processor_imu_no_vote.yaml
+++ b/demos/processor_imu_no_vote.yaml
@@ -1,4 +1,5 @@
-processor type: "IMU"              # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+type: "IMU"              # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+
 time tolerance: 0.0025         # Time tolerance for joining KFs
 unmeasured perturbation std: 0.00001
 keyframe vote:
diff --git a/demos/sensor_imu.yaml b/demos/sensor_imu.yaml
index 35386a9f8..2716803c3 100644
--- a/demos/sensor_imu.yaml
+++ b/demos/sensor_imu.yaml
@@ -1,4 +1,5 @@
-sensor type: "IMU"             # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+type: "IMU"             # This must match the KEY used in the SensorFactory. Otherwise it is an error.
+
 motion variances: 
     a_noise:                0.053     # standard deviation of Acceleration noise (same for all the axis) in m/s2
     w_noise:                0.0011    # standard deviation of Gyroscope noise (same for all the axis) in rad/sec
diff --git a/src/yaml/processor_IMU_yaml.cpp b/src/yaml/processor_IMU_yaml.cpp
index 58c9d3b3b..b6f3137ea 100644
--- a/src/yaml/processor_IMU_yaml.cpp
+++ b/src/yaml/processor_IMU_yaml.cpp
@@ -24,7 +24,7 @@ static ProcessorParamsBasePtr createProcessorIMUParams(const std::string & _file
 {
     YAML::Node config = YAML::LoadFile(_filename_dot_yaml);
 
-    if (config["processor type"].as<std::string>() == "IMU")
+    if (config["type"].as<std::string>() == "IMU")
     {
         YAML::Node kf_vote = config["keyframe vote"];
 
diff --git a/src/yaml/sensor_IMU_yaml.cpp b/src/yaml/sensor_IMU_yaml.cpp
index 358c59282..0d6d4c5d4 100644
--- a/src/yaml/sensor_IMU_yaml.cpp
+++ b/src/yaml/sensor_IMU_yaml.cpp
@@ -25,7 +25,7 @@ static IntrinsicsBasePtr createIntrinsicsIMU(const std::string & _filename_dot_y
 {
     YAML::Node config = YAML::LoadFile(_filename_dot_yaml);
 
-    if (config["sensor type"].as<std::string>() == "IMU")
+    if (config["type"].as<std::string>() == "IMU")
     {
         YAML::Node variances        = config["motion variances"];
         YAML::Node kf_vote          = config["keyframe vote"];
-- 
GitLab