diff --git a/demos/hello_wolf/yaml/processor_odom_2d.yaml b/demos/hello_wolf/yaml/processor_odom_2d.yaml index 04d0ff166981259edc9ca51dc3e39260fd427a62..907bbfab3be6e9f66feb6c027f34fa752fd893c4 100644 --- a/demos/hello_wolf/yaml/processor_odom_2d.yaml +++ b/demos/hello_wolf/yaml/processor_odom_2d.yaml @@ -10,3 +10,6 @@ keyframe_vote: max_buff_length: 999 cov_det: 999 apply_loss_function: true + +state_getter: true +state_priority: 1 diff --git a/include/core/processor/is_motion.h b/include/core/processor/is_motion.h index 767956aa9ec849bdd98c5dc643b1f5991d2bf1fc..7f3e2864dce16dc3277b7d5b2eecbbf786f28b74 100644 --- a/include/core/processor/is_motion.h +++ b/include/core/processor/is_motion.h @@ -19,21 +19,18 @@ WOLF_STRUCT_PTR_TYPEDEFS(ParamsIsMotion); struct ParamsIsMotion { - std::string name; bool state_getter = true; int state_priority = 1; ParamsIsMotion() = default; ParamsIsMotion(std::string _unique_name, const ParamsServer& _server) { - name = _server.getParam<std::string>("processor/" + _unique_name + "/name"); state_getter = _server.getParam<bool>("processor/" + _unique_name + "/state_getter"); state_priority = _server.getParam<double>("processor/" + _unique_name + "/state_priority"); } std::string print() const { - return "name: " + name + "\n" - + "state_getter: " + std::to_string(state_getter) + "\n" + return "state_getter: " + std::to_string(state_getter) + "\n" + "state_priority: " + std::to_string(state_priority) + "\n"; } @@ -56,7 +53,6 @@ class IsMotion VectorComposite getOdometry ( ) const; - std::string getProcessorName() const; bool isStateGetter() const; int getStatePriority() const; void setStatePriority(int); @@ -82,7 +78,6 @@ inline IsMotion::IsMotion(const StateStructure& _structure, ParamsIsMotionPtr _p // } - inline wolf::VectorComposite IsMotion::getOdometry ( ) const { return odometry_; @@ -91,19 +86,12 @@ inline wolf::VectorComposite IsMotion::getOdometry ( ) const } ///// IMPLEMENTATION /////// -#include "core/common/time_stamp.h" - namespace wolf{ inline IsMotion::~IsMotion() { } -inline std::string IsMotion::getProcessorName() const -{ - return params_is_motion_->name; -} - inline bool IsMotion::isStateGetter() const { return params_is_motion_->state_getter; diff --git a/src/tree_manager/tree_manager_sliding_window_dual_rate.cpp b/src/tree_manager/tree_manager_sliding_window_dual_rate.cpp index 43c8c48a317b9e6a5f261075fe170614cd8abf1c..c590c4b718504cfd357a15df2bdc27f379a9deea 100644 --- a/src/tree_manager/tree_manager_sliding_window_dual_rate.cpp +++ b/src/tree_manager/tree_manager_sliding_window_dual_rate.cpp @@ -38,7 +38,7 @@ void TreeManagerSlidingWindowDualRate::keyFrameCallback(FrameBasePtr _frame) { // FIXME: IsMotion::mergeCaptures pure virtual in IsMotion without need of casting WOLF_INFO("TreeManagerSlidingWindowDualRate::keyFrameCallback: IsMotion ", - is_motion_pair.second->getProcessorName(), + std::dynamic_pointer_cast<ProcessorBase>(is_motion_pair.second)->getName(), " couldn't be casted to ProcessorMotion. Not merging its captures..."); continue; }