From ff538adbda8a2a7e95666eced09a7eef2d6c1f49 Mon Sep 17 00:00:00 2001
From: Joaquim Casals <jcasals@iri.upc.edu>
Date: Wed, 8 May 2019 09:23:50 +0200
Subject: [PATCH] Preparation to merge with devel

---
 CMakeLists.txt                                   |  4 ++--
 hello_wolf/processor_range_bearing.cpp           |  6 +++---
 hello_wolf/processor_range_bearing.h             |  2 +-
 hello_wolf/sensor_range_bearing.cpp              |  6 +++---
 hello_wolf/sensor_range_bearing.h                |  2 +-
 include/base/problem/problem.h                   |  4 ++--
 ...or_factory.h => autoconf_processor_factory.h} | 16 ++++++++--------
 include/base/processor/processor_odom_2D.h       |  2 +-
 ...ensor_factory.h => autoconf_sensor_factory.h} | 16 ++++++++--------
 include/base/sensor/sensor_odom_2D.h             |  2 +-
 src/problem/problem.cpp                          |  4 ++--
 src/processor/processor_odom_2D.cpp              |  6 +++---
 src/sensor/sensor_odom_2D.cpp                    |  6 +++---
 wolf_scripts/out                                 |  8 ++++----
 14 files changed, 42 insertions(+), 42 deletions(-)
 rename include/base/processor/{new_processor_factory.h => autoconf_processor_factory.h} (93%)
 rename include/base/sensor/{new_sensor_factory.h => autoconf_sensor_factory.h} (94%)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb55130b4..13f761b60 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -385,7 +385,7 @@ SET(HDRS_LANDMARK
   include/base/landmark/landmark_polyline_2D.h
   )
 SET(HDRS_PROCESSOR
-  include/base/processor/new_processor_factory.h
+  include/base/processor/autoconf_processor_factory.h
   include/base/processor/diff_drive_tools.h
   include/base/processor/diff_drive_tools.hpp
   include/base/processor/motion_buffer.h
@@ -410,7 +410,7 @@ SET(HDRS_PROCESSOR
   include/base/processor/track_matrix.h
   )
 SET(HDRS_SENSOR
-  include/base/sensor/new_sensor_factory.h
+  include/base/sensor/autoconf_sensor_factory.h
   include/base/sensor/sensor_GPS.h
   include/base/sensor/sensor_GPS_fix.h
   include/base/sensor/sensor_IMU.h
diff --git a/hello_wolf/processor_range_bearing.cpp b/hello_wolf/processor_range_bearing.cpp
index 1bfd96846..09fdf3d53 100644
--- a/hello_wolf/processor_range_bearing.cpp
+++ b/hello_wolf/processor_range_bearing.cpp
@@ -110,7 +110,7 @@ ProcessorBasePtr ProcessorRangeBearing::create(const std::string& _unique_name,
     return prc;
 }
 
-ProcessorBasePtr ProcessorRangeBearing::createNew(const std::string& _unique_name,
+ProcessorBasePtr ProcessorRangeBearing::createAutoConf(const std::string& _unique_name,
                                                   const paramsServer& _server,
                                                   const SensorBasePtr _sensor_ptr)
 {
@@ -185,9 +185,9 @@ namespace wolf
 {
 WOLF_REGISTER_PROCESSOR("RANGE BEARING", ProcessorRangeBearing)
 } // namespace wolf
-#include "base/processor/new_processor_factory.h"
+#include "base/processor/autoconf_processor_factory.h"
 namespace wolf
 {
-WOLF_REGISTER_PROCESSORN("RANGE BEARING", ProcessorRangeBearing)
+WOLF_REGISTER_PROCESSOR_AUTO("RANGE BEARING", ProcessorRangeBearing)
 } // namespace wolf
 
diff --git a/hello_wolf/processor_range_bearing.h b/hello_wolf/processor_range_bearing.h
index f8c4b30bd..fe67364d2 100644
--- a/hello_wolf/processor_range_bearing.h
+++ b/hello_wolf/processor_range_bearing.h
@@ -40,7 +40,7 @@ class ProcessorRangeBearing : public ProcessorBase
         static ProcessorBasePtr create(const std::string& _unique_name,
                                        const ProcessorParamsBasePtr _params,
                                        const SensorBasePtr sensor_ptr = nullptr);
-        static ProcessorBasePtr createNew(const std::string& _unique_name,
+        static ProcessorBasePtr createAutoConf(const std::string& _unique_name,
                                           const paramsServer& _server,
                                           const SensorBasePtr _sensor_ptr = nullptr);
 
diff --git a/hello_wolf/sensor_range_bearing.cpp b/hello_wolf/sensor_range_bearing.cpp
index dee24fd62..571184f38 100644
--- a/hello_wolf/sensor_range_bearing.cpp
+++ b/hello_wolf/sensor_range_bearing.cpp
@@ -42,7 +42,7 @@ SensorBasePtr SensorRangeBearing::create(const std::string& _unique_name, //
     return sensor;
 }
 
-SensorBasePtr SensorRangeBearing::createNew(const std::string& _unique_name, //
+SensorBasePtr SensorRangeBearing::createAutoConf(const std::string& _unique_name, //
                                             const paramsServer& _server)
 {
     Eigen::Vector2s noise_std(0.1,1.0);
@@ -60,8 +60,8 @@ namespace wolf
 {
 WOLF_REGISTER_SENSOR("RANGE BEARING", SensorRangeBearing)
 } // namespace wolf
-#include "base/sensor/new_sensor_factory.h"
+#include "base/sensor/autoconf_sensor_factory.h"
 namespace wolf
 {
-WOLF_REGISTER_SENSORN("RANGE BEARING", SensorRangeBearing)
+WOLF_REGISTER_SENSOR_AUTO("RANGE BEARING", SensorRangeBearing)
 } // namespace wolf
diff --git a/hello_wolf/sensor_range_bearing.h b/hello_wolf/sensor_range_bearing.h
index 5eaebc6b3..c57c7761e 100644
--- a/hello_wolf/sensor_range_bearing.h
+++ b/hello_wolf/sensor_range_bearing.h
@@ -43,7 +43,7 @@ class SensorRangeBearing : public SensorBase
         static SensorBasePtr create(const std::string& _unique_name, //
                                     const Eigen::VectorXs& _extrinsics, //
                                     const IntrinsicsBasePtr _intrinsics);
-        static SensorBasePtr createNew(const std::string& _unique_name, //
+        static SensorBasePtr createAutoConf(const std::string& _unique_name, //
                                        const paramsServer& _server);
 };
 
diff --git a/include/base/problem/problem.h b/include/base/problem/problem.h
index 85838819b..58c5baae6 100644
--- a/include/base/problem/problem.h
+++ b/include/base/problem/problem.h
@@ -15,8 +15,8 @@ struct ProcessorParamsBase;
 
 //wolf includes
 #include "base/utils/params_server.hpp"
-#include "base/sensor/new_sensor_factory.h"
-#include "base/processor/new_processor_factory.h"
+#include "base/sensor/autoconf_sensor_factory.h"
+#include "base/processor/autoconf_processor_factory.h"
 #include "base/common/wolf.h"
 #include "base/frame/frame_base.h"
 #include "base/state_block/state_block.h"
diff --git a/include/base/processor/new_processor_factory.h b/include/base/processor/autoconf_processor_factory.h
similarity index 93%
rename from include/base/processor/new_processor_factory.h
rename to include/base/processor/autoconf_processor_factory.h
index fc6c2bc8c..93f997046 100644
--- a/include/base/processor/new_processor_factory.h
+++ b/include/base/processor/autoconf_processor_factory.h
@@ -5,8 +5,8 @@
  *      \author: jsola
  */
 
-#ifndef NEW_PROCESSOR_FACTORY_H_
-#define NEW_PROCESSOR_FACTORY_H_
+#ifndef AUTOCONF_PROCESSOR_FACTORY_H_
+#define AUTOCONF_PROCESSOR_FACTORY_H_
 
 namespace wolf
 {
@@ -168,17 +168,17 @@ namespace wolf
 typedef Factory<ProcessorBase,
         const std::string&,
         const paramsServer&,
-        const SensorBasePtr> NewProcessorFactory;
+        const SensorBasePtr> AutoConfProcessorFactory;
 template<>
-inline std::string NewProcessorFactory::getClass()
+inline std::string AutoConfProcessorFactory::getClass()
 {
-  return "NewProcessorFactory";
+    return "AutoConfProcessorFactory";
 }
 
 
-#define WOLF_REGISTER_PROCESSORN(ProcessorType, ProcessorName) \
-  namespace{ const bool WOLF_UNUSED ProcessorName##New##Registered = \
-    wolf::NewProcessorFactory::get().registerCreator(ProcessorType, ProcessorName::createNew); }\
+#define WOLF_REGISTER_PROCESSOR_AUTO(ProcessorType, ProcessorName) \
+  namespace{ const bool WOLF_UNUSED ProcessorName##AutoConf##Registered = \
+    wolf::AutoConfProcessorFactory::get().registerCreator(ProcessorType, ProcessorName::createAutoConf); }\
 
 } /* namespace wolf */
 
diff --git a/include/base/processor/processor_odom_2D.h b/include/base/processor/processor_odom_2D.h
index 5e0eff3a5..9223d20d8 100644
--- a/include/base/processor/processor_odom_2D.h
+++ b/include/base/processor/processor_odom_2D.h
@@ -88,7 +88,7 @@ class ProcessorOdom2D : public ProcessorMotion
         // Factory method
     public:
         static ProcessorBasePtr create(const std::string& _unique_name, const ProcessorParamsBasePtr _params, const SensorBasePtr sensor_ptr = nullptr);
-        static ProcessorBasePtr createNew(const std::string& _unique_name, const paramsServer& _server, const SensorBasePtr sensor_ptr = nullptr);
+        static ProcessorBasePtr createAutoConf(const std::string& _unique_name, const paramsServer& _server, const SensorBasePtr sensor_ptr = nullptr);
 };
 
 inline Eigen::VectorXs ProcessorOdom2D::deltaZero() const
diff --git a/include/base/sensor/new_sensor_factory.h b/include/base/sensor/autoconf_sensor_factory.h
similarity index 94%
rename from include/base/sensor/new_sensor_factory.h
rename to include/base/sensor/autoconf_sensor_factory.h
index b84afb0ec..c91e992d4 100644
--- a/include/base/sensor/new_sensor_factory.h
+++ b/include/base/sensor/autoconf_sensor_factory.h
@@ -5,8 +5,8 @@
  *      \author: jsola
  */
 
-#ifndef NEW_SENSOR_FACTORY_H_
-#define NEW_SENSOR_FACTORY_H_
+#ifndef AUTOCONF_SENSOR_FACTORY_H_
+#define AUTOCONF_SENSOR_FACTORY_H_
 
 namespace wolf
 {
@@ -210,17 +210,17 @@ namespace wolf
 
 typedef Factory<SensorBase,
                 const std::string&,
-                const paramsServer&> NewSensorFactory;
+                const paramsServer&> AutoConfSensorFactory;
 
 template<>
-inline std::string NewSensorFactory::getClass()
+inline std::string AutoConfSensorFactory::getClass()
 {
-  return "NewSensorFactory";
+  return "AutoConfSensorFactory";
 }
 
-#define WOLF_REGISTER_SENSORN(SensorType, SensorName) \
-  namespace{ const bool WOLF_UNUSED SensorName##New##Registered = \
-    NewSensorFactory::get().registerCreator(SensorType, SensorName::createNew); }\
+#define WOLF_REGISTER_SENSOR_AUTO(SensorType, SensorName) \
+  namespace{ const bool WOLF_UNUSED SensorName##AutConf##Registered = \
+     AutoConfSensorFactory::get().registerCreator(SensorType, SensorName::createAutoConf); } \
 
 } /* namespace wolf */
 
diff --git a/include/base/sensor/sensor_odom_2D.h b/include/base/sensor/sensor_odom_2D.h
index 92b6bb111..00063aa3e 100644
--- a/include/base/sensor/sensor_odom_2D.h
+++ b/include/base/sensor/sensor_odom_2D.h
@@ -58,7 +58,7 @@ class SensorOdom2D : public SensorBase
 
 	public:
         static SensorBasePtr create(const std::string& _unique_name, const Eigen::VectorXs& _extrinsics_pq, const IntrinsicsBasePtr _intrinsics);
-        static SensorBasePtr createNew(const std::string& _unique_name, const paramsServer& _server);
+        static SensorBasePtr createAutoConf(const std::string& _unique_name, const paramsServer& _server);
 
 };
 
diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp
index 8e607b0d4..3162feec0 100644
--- a/src/problem/problem.cpp
+++ b/src/problem/problem.cpp
@@ -146,7 +146,7 @@ SensorBasePtr Problem::installSensor(const std::string& _sen_type, //
                                          const std::string& _unique_sensor_name, //
                                          const paramsServer& _server)
     {
-        SensorBasePtr sen_ptr = NewSensorFactory::get().create(uppercase(_sen_type), _unique_sensor_name, _server);
+        SensorBasePtr sen_ptr = AutoConfSensorFactory::get().create(uppercase(_sen_type), _unique_sensor_name, _server);
         addSensor(sen_ptr);
         return sen_ptr;
     }
@@ -203,7 +203,7 @@ ProcessorBasePtr Problem::installProcessor(const std::string& _prc_type, //
     SensorBasePtr sen_ptr = getSensor(_corresponding_sensor_name);
     if (sen_ptr == nullptr)
         throw std::runtime_error("Sensor not found. Cannot bind Processor.");
-    ProcessorBasePtr prc_ptr = NewProcessorFactory::get().create(uppercase(_prc_type), _unique_processor_name, _server, sen_ptr);
+    ProcessorBasePtr prc_ptr = AutoConfProcessorFactory::get().create(uppercase(_prc_type), _unique_processor_name, _server, sen_ptr);
     prc_ptr->configure(sen_ptr);
     sen_ptr->addProcessor(prc_ptr);
 
diff --git a/src/processor/processor_odom_2D.cpp b/src/processor/processor_odom_2D.cpp
index f36a7abc3..9502aef7e 100644
--- a/src/processor/processor_odom_2D.cpp
+++ b/src/processor/processor_odom_2D.cpp
@@ -188,7 +188,7 @@ ProcessorBasePtr ProcessorOdom2D::create(const std::string& _unique_name, const
 
     return prc_ptr;
 }
-ProcessorBasePtr ProcessorOdom2D::createNew(const std::string& _unique_name, const paramsServer& _server, const SensorBasePtr sensor_ptr)
+ProcessorBasePtr ProcessorOdom2D::createAutoConf(const std::string& _unique_name, const paramsServer& _server, const SensorBasePtr sensor_ptr)
 {
 
     ProcessorOdom2DPtr prc_ptr;
@@ -216,7 +216,7 @@ ProcessorBasePtr ProcessorOdom2D::createNew(const std::string& _unique_name, con
 namespace wolf {
 WOLF_REGISTER_PROCESSOR("ODOM 2D", ProcessorOdom2D)
 } // namespace wolf
-#include "base/processor/new_processor_factory.h"
+#include "base/processor/autoconf_processor_factory.h"
 namespace wolf {
-    WOLF_REGISTER_PROCESSORN("ODOM 2D", ProcessorOdom2D)
+    WOLF_REGISTER_PROCESSOR_AUTO("ODOM 2D", ProcessorOdom2D)
 } // namespace wolf
diff --git a/src/sensor/sensor_odom_2D.cpp b/src/sensor/sensor_odom_2D.cpp
index 0fba6c4b5..c3da06160 100644
--- a/src/sensor/sensor_odom_2D.cpp
+++ b/src/sensor/sensor_odom_2D.cpp
@@ -58,7 +58,7 @@ SensorBasePtr SensorOdom2D::create(const std::string& _unique_name, const Eigen:
     return odo;
 }
 
-SensorBasePtr SensorOdom2D::createNew(const std::string& _unique_name, const paramsServer& _server)
+SensorBasePtr SensorOdom2D::createAutoConf(const std::string& _unique_name, const paramsServer& _server)
 {
     // Eigen::VectorXs _extrinsics_po = Eigen::Vector3s(0,0,0);
     Eigen::VectorXs _extrinsics_po = _server.getParam<Eigen::VectorXs>(_unique_name + "/extrinsic/pos", "[0,0,0]");
@@ -79,7 +79,7 @@ SensorBasePtr SensorOdom2D::createNew(const std::string& _unique_name, const par
 namespace wolf {
 WOLF_REGISTER_SENSOR("ODOM 2D", SensorOdom2D)
 } // namespace wolf
-#include "base/sensor/new_sensor_factory.h"
+#include "base/sensor/autoconf_sensor_factory.h"
 namespace wolf {
-WOLF_REGISTER_SENSORN("ODOM 2D", SensorOdom2D)
+WOLF_REGISTER_SENSOR_AUTO("ODOM 2D", SensorOdom2D)
 } // namespace wolf
diff --git a/wolf_scripts/out b/wolf_scripts/out
index 93fc67671..2b7857b6b 100644
--- a/wolf_scripts/out
+++ b/wolf_scripts/out
@@ -132,7 +132,7 @@
 -===============================================================
 +====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/problem.h ==================================
 -===============================================================
-+====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/new_processor_factory.h ==================================
++====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/autoconf_processor_factory.h ==================================
 -===============================================================
 +====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/state_homogeneous_3D.h ==================================
 -===============================================================
@@ -146,7 +146,7 @@
 -===============================================================
 +====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/processor_tracker_feature.h ==================================
 -===============================================================
-+====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/new_sensor_factory.h ==================================
++====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/autoconf_sensor_factory.h ==================================
 -===============================================================
 +====================== /home/jcasals/workspace/wip/wolf/src/core/include/core/constraint_analytic.h ==================================
 -===============================================================
@@ -273,8 +273,8 @@
 #include "factory.h"
 #include "sensor_factory.h"
 #include "processor_factory.h"
-#include "new_sensor_factory.h"
-#include "new_processor_factory.h"
+#include "autoconf_sensor_factory.h"
+#include "autoconf_processor_factory.h"
 #include "constraint_base.h"
 #include "state_block.h"
 #include "processor_motion.h"
-- 
GitLab