From d28fa829b71777ec43a803c93b74d601fd40bec9 Mon Sep 17 00:00:00 2001 From: joanvallve <jvallve@iri.upc.edu> Date: Thu, 4 Mar 2021 18:33:51 +0100 Subject: [PATCH] more small changes and fixes --- demos/hello_wolf/yaml/processor_odom_2d.yaml | 3 +++ include/core/processor/is_motion.h | 14 +------------- .../tree_manager_sliding_window_dual_rate.cpp | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/demos/hello_wolf/yaml/processor_odom_2d.yaml b/demos/hello_wolf/yaml/processor_odom_2d.yaml index 04d0ff166..907bbfab3 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 767956aa9..7f3e2864d 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 43c8c48a3..c590c4b71 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; } -- GitLab