diff --git a/CMakeLists.txt b/CMakeLists.txt index eb55130b4c3687e278683c638d9ffde6288898c6..13f761b6025d53a095b373fad65dff47d0b220a7 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 1bfd9684616393396492819f07ed8cf7aad8c907..09fdf3d5370f1752329f4f5e056abd57e920aa00 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 f8c4b30bd2049d0301e76eedda3680ecd82ace9a..fe67364d2845f866f52da686c3d53b3a5308e906 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 dee24fd62e0b55d453359283681032de9fce4038..571184f383832b931f3602a07c9f498a35480a71 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 5eaebc6b30d379e64c698bc19d89cbe6e9c20f3c..c57c7761e55987ec3c69520971a478944f2c0eb1 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 85838819bfc2febcefde4d6fc0867e445bea8256..58c5baae642c07ef8c49ce456fe5aec5974635dd 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 fc6c2bc8c727e5fa318b3c0c5d8291f4f6575fa3..93f9970463378e25af30cbea8a73c6c25445eeb5 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 5e0eff3a58c7966d34fa582a774d8df83443b46a..9223d20d8ae34adb4801139ebaa62845478ba972 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 b84afb0ec0b1140da7592a3dfe53573e56088c96..c91e992d46b1785b562b96bca242d6a9d3ab2e75 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 92b6bb111cb35b033b27ebe3d0ca2d220f573137..00063aa3e49d0b436dfbce1d01538b3d5fdb4513 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 8e607b0d4e7891e7978d4b2b127a8eabbe367cac..3162feec0455614311ce806a59e59ae14f7b5dae 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 f36a7abc3a5a1fadf8276e8c6d2fc79a048d7cb6..9502aef7ef9c11a25f23ead8b902332943b4a492 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 0fba6c4b5660fa08c28e14c69a001b7538db9237..c3da06160c2607c38cb74d61f22e86e702549fea 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 93fc67671cc2375e1857e43c0b57ff52ad2b7b35..2b7857b6ba924b96ce256a0a7661b7079c429a2a 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"