1 #ifndef CNODEREGISTRATIONDECIDER_IMPL_H 2 #define CNODEREGISTRATIONDECIDER_IMPL_H 12 template<
class GRAPH_T>
17 m_init_inf_mat.unit();
18 m_init_inf_mat *= 10000;
19 resetPDF(&this->m_since_prev_node_PDF);
23 template<
class GRAPH_T>
27 template<
class GRAPH_T>
33 parent_t::getDescriptiveReport(report_str);
35 ss <<
"Node Registration Decider Strategy [NRD]: " << endl;
36 *report_str += ss.str();
41 template<
class GRAPH_T>
44 template<
class GRAPH_T>
46 const typename GRAPH_T::constraint_t& constraint) {
56 this->getCurrentRobotPosEstimation();
57 this->addNodeAnnotsToPose(&tmp_pose);
60 std::pair<typename GRAPH_T::global_poses_t::const_iterator, bool>
res =
61 this->m_graph->nodes.insert(make_pair(
62 this->m_graph->root, tmp_pose));
65 "nodeID \"%lu\" with pose \"%s\" seems to be already registered.",
66 this->m_graph->root, tmp_pose.asString().c_str()));
68 this->m_prev_registered_nodeID = this->m_graph->root;
72 TNodeID from = this->m_prev_registered_nodeID;
75 TNodeID to = this->m_graph->nodeCount();
80 this->getCurrentRobotPosEstimation();
81 this->addNodeAnnotsToPose(&tmp_pose);
84 std::pair<typename GRAPH_T::global_poses_t::const_iterator, bool>
res =
85 this->m_graph->nodes.insert(make_pair(
89 "nodeID \"%lu\" with pose \"%s\" seems to be already registered.",
90 to, tmp_pose.asString().c_str()));
91 this->m_graph->insertEdgeAtEnd(from, to, constraint);
94 m_prev_registered_nodeID = to;
98 "\t" << from <<
" => " << to << endl <<
99 "\tEdge: " << constraint.getMeanVal().asString());
105 template<
class GRAPH_T>
107 bool res = this->registerNewNodeAtEnd(this->m_since_prev_node_PDF);
110 this->resetPDF(&m_since_prev_node_PDF);
115 template<
class GRAPH_T>
122 c->cov_inv = this->m_init_inf_mat;
128 template<
class GRAPH_T>
132 template<
class GRAPH_T>
139 this->m_graph->nodes.at(this->m_prev_registered_nodeID);
142 pose_out += m_since_prev_node_PDF.getMeanVal();
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Interface for implementing node registration classes.
CNodeRegistrationDecider()
Default class constructor.
GRAPH_t ::constraint_t constraint_t
type of graph constraints
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
#define MRPT_LOG_WARN_STREAM(__CONTENTS)
uint64_t TNodeID
The type for node IDs in graphs of different types.
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
GRAPH_t ::global_pose_t global_pose_t
#define MRPT_LOG_DEBUG_STREAM(__CONTENTS)
#define ASSERTMSG_(f, __ERROR_MSG)