9 #ifndef CNODEREGISTRATIONDECIDER_IMPL_H
10 #define CNODEREGISTRATIONDECIDER_IMPL_H
20 template <
class GRAPH_T>
31 template <
class GRAPH_T>
36 template <
class GRAPH_T>
45 ss <<
"Node Registration Decider Strategy [NRD]: " << endl;
46 *report_str += ss.str();
51 template <
class GRAPH_T>
57 template <
class GRAPH_T>
59 const typename GRAPH_T::constraint_t& constraint)
74 std::pair<typename GRAPH_T::global_poses_t::const_iterator, bool>
res =
76 make_pair(this->
m_graph->root, tmp_pose));
79 "nodeID \"%lu\" with pose \"%s\" seems to be "
80 "already registered.",
81 this->m_graph->root, tmp_pose.asString().c_str()));
98 std::pair<typename GRAPH_T::global_poses_t::const_iterator, bool>
res =
99 this->
m_graph->nodes.insert(make_pair(to, tmp_pose));
102 "nodeID \"%lu\" with pose \"%s\" seems to be "
103 "already registered.",
104 to, tmp_pose.asString().c_str()));
105 this->
m_graph->insertEdgeAtEnd(from, to, constraint);
111 "Registered new node:" << endl
112 <<
"\t" << from <<
" => " << to << endl
114 << constraint.getMeanVal().asString());
120 template <
class GRAPH_T>
131 template <
class GRAPH_T>
144 template <
class GRAPH_T>
150 template <
class GRAPH_T>
151 typename GRAPH_T::global_pose_t
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
GRAPH_T * m_graph
Pointer to the graph that is under construction.
CNodeRegistrationDecider()
Default class constructor.
virtual global_pose_t getCurrentRobotPosEstimation() const
Getter method for fetching the currently estimated robot position.
void resetPDF(constraint_t *c)
Reset the given PDF method and assign a fixed high-certainty Covariance/Information matrix.
typename GRAPH_T::constraint_t constraint_t
type of graph constraints
mrpt::graphs::TNodeID m_prev_registered_nodeID
Store the last registered NodeID.
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
virtual ~CNodeRegistrationDecider()
Default class destructor.
typename GRAPH_T::global_pose_t global_pose_t
inf_mat_t m_init_inf_mat
Initial information matrix for paths.
virtual void addNodeAnnotsToPose(global_pose_t *pose) const
Get a global_pose_t and fill the NODE_ANNOTATIONS-related fields.
constraint_t m_since_prev_node_PDF
Tracking the PDF of the current position of the robot with regards to the <b previous registered node...
bool registerNewNodeAtEnd()
Same goal as the previous method - uses the m_since_prev_node_PDF as the constraint at the end.
virtual bool checkRegistrationCondition()
Check whether a new node should be registered in the graph.
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
#define ASSERTDEBMSG_(f, __ERROR_MSG)
GLsizei const GLchar ** string
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
uint64_t TNodeID
A generic numeric type for unique IDs of nodes or entities.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#define MRPT_LOG_WARN(_STRING)
#define MRPT_LOG_DEBUG_STREAM(__CONTENTS)
Use: MRPT_LOG_DEBUG_STREAM("Var=" << value << " foo=" << foo_var);