From f21f816218ba6762c8732ed97f9f41afb1adc08e Mon Sep 17 00:00:00 2001
From: joanvallve <jvallve@iri.upc.edu>
Date: Mon, 13 Jan 2025 13:15:58 +0100
Subject: [PATCH] parameter name changed

---
 demos/hello_wolf/hello_wolf.cpp                  | 2 +-
 demos/hello_wolf/yaml/processor_odom_2d.yaml     | 2 +-
 include/core/processor/processor_odom_2d.h       | 8 ++++----
 schema/processor/ProcessorOdom2d.schema          | 2 +-
 src/processor/processor_odom_2d.cpp              | 2 +-
 test/gtest_processor_motion.cpp                  | 2 +-
 test/yaml/processor_diff_drive.yaml              | 2 +-
 test/yaml/processor_odom_2d.yaml                 | 2 +-
 test/yaml/processor_odom_2d_inactive.yaml        | 2 +-
 yaml_templates/processor/ProcessorDiffDrive.yaml | 2 +-
 yaml_templates/processor/ProcessorOdom2d.yaml    | 2 +-
 11 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/demos/hello_wolf/hello_wolf.cpp b/demos/hello_wolf/hello_wolf.cpp
index 63bb828ae..42d6242d3 100644
--- a/demos/hello_wolf/hello_wolf.cpp
+++ b/demos/hello_wolf/hello_wolf.cpp
@@ -150,7 +150,7 @@ int main()
     params_prc_odo["keyframe_vote"]["max_time_span"]     = 999;
     params_prc_odo["keyframe_vote"]["max_dist_traveled"] = 0.95;  // Will make KFs automatically every 1m displacement
     params_prc_odo["keyframe_vote"]["max_angle_turned"]  = 999;
-    params_prc_odo["keyframe_vote"]["cov_det"]           = 999;
+    params_prc_odo["keyframe_vote"]["max_cov_det"]       = 999;
     params_prc_odo["keyframe_vote"]["max_buff_length"]   = 999;
     params_prc_odo["state_provider"]                     = true;
     params_prc_odo["state_provider_order"]               = 1;
diff --git a/demos/hello_wolf/yaml/processor_odom_2d.yaml b/demos/hello_wolf/yaml/processor_odom_2d.yaml
index 6d9e0e886..84e778878 100644
--- a/demos/hello_wolf/yaml/processor_odom_2d.yaml
+++ b/demos/hello_wolf/yaml/processor_odom_2d.yaml
@@ -8,7 +8,7 @@ keyframe_vote:
   max_dist_traveled:  0.95
   max_angle_turned:   999
   max_buff_length:    999
-  cov_det:            999
+  max_cov_det:        999
 apply_loss_function: true
 
 state_provider: true
diff --git a/include/core/processor/processor_odom_2d.h b/include/core/processor/processor_odom_2d.h
index db05b1425..3746ff056 100644
--- a/include/core/processor/processor_odom_2d.h
+++ b/include/core/processor/processor_odom_2d.h
@@ -34,12 +34,12 @@ class ProcessorOdom2d : public ProcessorMotion
   public:
     ProcessorOdom2d(const YAML::Node& _params);
     ~ProcessorOdom2d() override;
-    void configure(SensorBasePtr _sensor) override{};
+    void configure(SensorBasePtr _sensor) override {};
 
     // Factory method for high level API
     WOLF_PROCESSOR_CREATE(ProcessorOdom2d);
 
-    double getCovDet() const;
+    double getMaxCovDet() const;
     bool   voteForKeyFrame() const override;
 
   protected:
@@ -101,9 +101,9 @@ inline VectorXd ProcessorOdom2d::getCalibration(const CaptureBaseConstPtr _captu
 
 inline void ProcessorOdom2d::setCalibration(const CaptureBasePtr _capture, const VectorXd& _calibration) {}
 
-inline double ProcessorOdom2d::getCovDet() const
+inline double ProcessorOdom2d::getMaxCovDet() const
 {
-    return params_["keyframe_vote"]["cov_det"].as<double>();
+    return params_["keyframe_vote"]["max_cov_det"].as<double>();
 }
 
 }  // namespace wolf
diff --git a/schema/processor/ProcessorOdom2d.schema b/schema/processor/ProcessorOdom2d.schema
index 418be7086..41b76cdc7 100644
--- a/schema/processor/ProcessorOdom2d.schema
+++ b/schema/processor/ProcessorOdom2d.schema
@@ -1,7 +1,7 @@
 follow: ProcessorMotion.schema
 
 keyframe_vote:
-  cov_det:
+  max_cov_det:
     _mandatory: $voting_active
     _type: double
     _doc: The determinant threshold of the covariance matrix of the integrated delta, to vote for a keyframe.
\ No newline at end of file
diff --git a/src/processor/processor_odom_2d.cpp b/src/processor/processor_odom_2d.cpp
index f9e10a83f..5e90e721e 100644
--- a/src/processor/processor_odom_2d.cpp
+++ b/src/processor/processor_odom_2d.cpp
@@ -138,7 +138,7 @@ bool ProcessorOdom2d::voteForKeyFrame() const
         return true;
     }
     // Uncertainty criterion
-    if (getBuffer().back().delta_integr_cov_.determinant() > getCovDet())
+    if (getBuffer().back().delta_integr_cov_.determinant() > getMaxCovDet())
     {
         WOLF_DEBUG("PM", id(), " ", getType(), " votes per state covariance");
         return true;
diff --git a/test/gtest_processor_motion.cpp b/test/gtest_processor_motion.cpp
index 29be8cd23..7f3502946 100644
--- a/test/gtest_processor_motion.cpp
+++ b/test/gtest_processor_motion.cpp
@@ -82,7 +82,7 @@ class ProcessorMotion_test : public testing::Test
         params["keyframe_vote"]["max_dist_traveled"] = 100;
         params["keyframe_vote"]["max_angle_turned"]  = 6.28;
         params["keyframe_vote"]["max_time_span"]     = 2.5 * dt;  // force KF at every third process()
-        params["keyframe_vote"]["cov_det"]           = 100;
+        params["keyframe_vote"]["max_cov_det"]       = 100;
         params["unmeasured_perturbation_std"]        = 0.001;
 
         // install processor
diff --git a/test/yaml/processor_diff_drive.yaml b/test/yaml/processor_diff_drive.yaml
index bea2900eb..e4eff792b 100644
--- a/test/yaml/processor_diff_drive.yaml
+++ b/test/yaml/processor_diff_drive.yaml
@@ -11,7 +11,7 @@ keyframe_vote:
   max_buff_length: 99 # motion deltas
   max_dist_traveled: 99 # meters
   max_angle_turned: 99 # radians (1 rad approx 57 deg, approx 60 deg)
-  cov_det: 99 
+  max_cov_det: 99 
 
 unmeasured_perturbation_std: 0.001
 
diff --git a/test/yaml/processor_odom_2d.yaml b/test/yaml/processor_odom_2d.yaml
index e379b4ed7..bdd02893d 100644
--- a/test/yaml/processor_odom_2d.yaml
+++ b/test/yaml/processor_odom_2d.yaml
@@ -11,7 +11,7 @@ keyframe_vote:
   max_buff_length: 100 # motion deltas
   max_dist_traveled: 100 # meters
   max_angle_turned: 1.963495 # radians (1 rad approx 57 deg, approx 60 deg)
-  cov_det: 100 # determinant of covariance threshold
+  max_cov_det: 100 # determinant of covariance threshold
 
 unmeasured_perturbation_std: 0.001
 
diff --git a/test/yaml/processor_odom_2d_inactive.yaml b/test/yaml/processor_odom_2d_inactive.yaml
index 7dee0ea14..2864aef8e 100644
--- a/test/yaml/processor_odom_2d_inactive.yaml
+++ b/test/yaml/processor_odom_2d_inactive.yaml
@@ -11,7 +11,7 @@ keyframe_vote:
   max_buff_length: 100 #10 # motion deltas
   max_dist_traveled: 100 #0.5 # meters
   max_angle_turned: 0.1 # radians (1 rad approx 57 deg, approx 60 deg)
-  cov_det: 100 #1 # determinant of covariance threshold
+  max_cov_det: 100 #1 # determinant of covariance threshold
 
 unmeasured_perturbation_std: 0.001
 
diff --git a/yaml_templates/processor/ProcessorDiffDrive.yaml b/yaml_templates/processor/ProcessorDiffDrive.yaml
index 12587124f..b9f5c23c9 100644
--- a/yaml_templates/processor/ProcessorDiffDrive.yaml
+++ b/yaml_templates/processor/ProcessorDiffDrive.yaml
@@ -8,7 +8,7 @@ keyframe_vote:
   max_buff_length: 0  # MANDATORY if $voting_active - DOC Maximum size of the buffer of motions. - TYPE unsigned int
   max_dist_traveled: 0.0  # MANDATORY if $voting_active - DOC Distance traveled threshold to create a new frame [m]. - TYPE double
   max_angle_turned: 0.0  # MANDATORY if $voting_active - DOC Angle turned threshold to create a new frame [rad]. - TYPE double
-  cov_det: 0.0  # MANDATORY if $voting_active - DOC The determinant threshold of the covariance matrix of the integrated delta, to vote for a keyframe. - TYPE double
+  max_cov_det: 0.0  # MANDATORY if $voting_active - DOC The determinant threshold of the covariance matrix of the integrated delta, to vote for a keyframe. - TYPE double
 apply_loss_function: false  # DOC If the factors created by the processor have loss function. - TYPE bool
 state_provider: false  # DOC If the processor is used by the problem as provider of state. - TYPE bool
 state_provider_order: 0.0  # MANDATORY if $state_provider - DOC The order number of this processor when problem gets the state (only used if state_provider = true). Two processors cannot have the same priority (if so, when installing the second is increased). - TYPE double
diff --git a/yaml_templates/processor/ProcessorOdom2d.yaml b/yaml_templates/processor/ProcessorOdom2d.yaml
index 12587124f..b9f5c23c9 100644
--- a/yaml_templates/processor/ProcessorOdom2d.yaml
+++ b/yaml_templates/processor/ProcessorOdom2d.yaml
@@ -8,7 +8,7 @@ keyframe_vote:
   max_buff_length: 0  # MANDATORY if $voting_active - DOC Maximum size of the buffer of motions. - TYPE unsigned int
   max_dist_traveled: 0.0  # MANDATORY if $voting_active - DOC Distance traveled threshold to create a new frame [m]. - TYPE double
   max_angle_turned: 0.0  # MANDATORY if $voting_active - DOC Angle turned threshold to create a new frame [rad]. - TYPE double
-  cov_det: 0.0  # MANDATORY if $voting_active - DOC The determinant threshold of the covariance matrix of the integrated delta, to vote for a keyframe. - TYPE double
+  max_cov_det: 0.0  # MANDATORY if $voting_active - DOC The determinant threshold of the covariance matrix of the integrated delta, to vote for a keyframe. - TYPE double
 apply_loss_function: false  # DOC If the factors created by the processor have loss function. - TYPE bool
 state_provider: false  # DOC If the processor is used by the problem as provider of state. - TYPE bool
 state_provider_order: 0.0  # MANDATORY if $state_provider - DOC The order number of this processor when problem gets the state (only used if state_provider = true). Two processors cannot have the same priority (if so, when installing the second is increased). - TYPE double
-- 
GitLab