Skip to content
Snippets Groups Projects
Commit d28fa829 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

more small changes and fixes

parent 2e63a58c
No related branches found
No related tags found
1 merge request!414Resolve "IsMotion used in Problem::getState()"
Pipeline #6426 passed
...@@ -10,3 +10,6 @@ keyframe_vote: ...@@ -10,3 +10,6 @@ keyframe_vote:
max_buff_length: 999 max_buff_length: 999
cov_det: 999 cov_det: 999
apply_loss_function: true apply_loss_function: true
state_getter: true
state_priority: 1
...@@ -19,21 +19,18 @@ WOLF_STRUCT_PTR_TYPEDEFS(ParamsIsMotion); ...@@ -19,21 +19,18 @@ WOLF_STRUCT_PTR_TYPEDEFS(ParamsIsMotion);
struct ParamsIsMotion struct ParamsIsMotion
{ {
std::string name;
bool state_getter = true; bool state_getter = true;
int state_priority = 1; int state_priority = 1;
ParamsIsMotion() = default; ParamsIsMotion() = default;
ParamsIsMotion(std::string _unique_name, const ParamsServer& _server) 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_getter = _server.getParam<bool>("processor/" + _unique_name + "/state_getter");
state_priority = _server.getParam<double>("processor/" + _unique_name + "/state_priority"); state_priority = _server.getParam<double>("processor/" + _unique_name + "/state_priority");
} }
std::string print() const std::string print() const
{ {
return "name: " + name + "\n" return "state_getter: " + std::to_string(state_getter) + "\n"
+ "state_getter: " + std::to_string(state_getter) + "\n"
+ "state_priority: " + std::to_string(state_priority) + "\n"; + "state_priority: " + std::to_string(state_priority) + "\n";
} }
...@@ -56,7 +53,6 @@ class IsMotion ...@@ -56,7 +53,6 @@ class IsMotion
VectorComposite getOdometry ( ) const; VectorComposite getOdometry ( ) const;
std::string getProcessorName() const;
bool isStateGetter() const; bool isStateGetter() const;
int getStatePriority() const; int getStatePriority() const;
void setStatePriority(int); void setStatePriority(int);
...@@ -82,7 +78,6 @@ inline IsMotion::IsMotion(const StateStructure& _structure, ParamsIsMotionPtr _p ...@@ -82,7 +78,6 @@ inline IsMotion::IsMotion(const StateStructure& _structure, ParamsIsMotionPtr _p
// //
} }
inline wolf::VectorComposite IsMotion::getOdometry ( ) const inline wolf::VectorComposite IsMotion::getOdometry ( ) const
{ {
return odometry_; return odometry_;
...@@ -91,19 +86,12 @@ inline wolf::VectorComposite IsMotion::getOdometry ( ) const ...@@ -91,19 +86,12 @@ inline wolf::VectorComposite IsMotion::getOdometry ( ) const
} }
///// IMPLEMENTATION /////// ///// IMPLEMENTATION ///////
#include "core/common/time_stamp.h"
namespace wolf{ namespace wolf{
inline IsMotion::~IsMotion() inline IsMotion::~IsMotion()
{ {
} }
inline std::string IsMotion::getProcessorName() const
{
return params_is_motion_->name;
}
inline bool IsMotion::isStateGetter() const inline bool IsMotion::isStateGetter() const
{ {
return params_is_motion_->state_getter; return params_is_motion_->state_getter;
......
...@@ -38,7 +38,7 @@ void TreeManagerSlidingWindowDualRate::keyFrameCallback(FrameBasePtr _frame) ...@@ -38,7 +38,7 @@ void TreeManagerSlidingWindowDualRate::keyFrameCallback(FrameBasePtr _frame)
{ {
// FIXME: IsMotion::mergeCaptures pure virtual in IsMotion without need of casting // FIXME: IsMotion::mergeCaptures pure virtual in IsMotion without need of casting
WOLF_INFO("TreeManagerSlidingWindowDualRate::keyFrameCallback: IsMotion ", 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..."); " couldn't be casted to ProcessorMotion. Not merging its captures...");
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment