Go to the documentation of this file. 1 #ifndef CINCREMENTALNODEREGISTRATIONDECIDER_IMPL_H_UQKZGLEM
2 #define CINCREMENTALNODEREGISTRATIONDECIDER_IMPL_H_UQKZGLEM
10 template <
class GRAPH_T>
11 CIncrementalNodeRegistrationDecider<
16 template <
class GRAPH_T>
18 GRAPH_T>::~CIncrementalNodeRegistrationDecider()
22 template <
class GRAPH_T>
29 pose_t last_pose_inserted =
31 ? this->m_graph->nodes.at(this->m_prev_registered_nodeID)
35 bool registered =
false;
37 if (this->checkRegistrationConditionPose(
38 last_pose_inserted, this->getCurrentRobotPosEstimation()))
40 registered = this->registerNewNodeAtEnd();
47 template <
class GRAPH_T>
64 template <
class GRAPH_T>
71 std::cout <<
"In checkRegistrationConditionPose:\np1: " << p1.
asString()
72 <<
"\np2: " << p1.
asString() << std::endl;
77 params.registration_max_angle) ||
79 params.registration_max_angle) ||
88 template <
class GRAPH_T>
93 parent_t::loadParams(source_fname);
95 params.loadFromConfigFileName(
96 source_fname,
"NodeRegistrationDeciderParameters");
101 template <
class GRAPH_T>
105 parent_t::printParams();
111 template <
class GRAPH_T>
118 *report_str +=
params.getAsString();
119 *report_str += this->report_sep;
127 template <
class GRAPH_T>
132 template <
class GRAPH_T>
137 template <
class GRAPH_T>
139 std::ostream& out)
const
146 template <
class GRAPH_T>
153 registration_max_distance =
source.read_double(
154 section,
"registration_max_distance", 0.5 ,
false);
155 registration_max_angle =
source.read_double(
156 section,
"registration_max_angle", 15 ,
false);
157 registration_max_angle =
DEG2RAD(registration_max_angle);
162 template <
class GRAPH_T>
169 double max_angle_deg =
RAD2DEG(registration_max_angle);
173 "------------------[ Fixed Intervals Incremental Node Registration "
174 "]------------------\n";
176 "Max distance for registration = %.2f m\n", registration_max_distance);
178 "Max angle for registration = %.2f deg\n", max_angle_deg);
183 template <
class GRAPH_T>
190 this->getAsString(&str);
double pitch() const
Get the PITCH angle (in radians)
virtual void printParams() const
Print the problem parameters - relevant to the decider/optimizer to the screen in a unified/compact w...
const double & phi() const
Get the phi angle of the 2D pose (in radians)
double distanceTo(const CPoseOrPoint< OTHERCLASS > &b) const
Returns the Euclidean distance to another pose/point:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
double RAD2DEG(const double x)
Radians to degrees.
virtual bool checkRegistrationCondition()
If estimated position surpasses the registration max values since the previous registered node,...
GLsizei GLsizei GLchar * source
virtual void getDescriptiveReport(std::string *report_str) const
Fill the provided string with a detailed report of the decider/optimizer state.
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion)
This method load the options from a ".ini"-like file or memory-stored string list.
T wrapToPi(T a)
Modifies the given angle to translate it into the ]-pi,pi] range.
This class allows loading and storing values and vectors of different types from a configuration text...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Incremental Node registration decider.
double roll() const
Get the ROLL angle (in radians)
std::string getAsString() const
typename GRAPH_T::constraint_t::type_value pose_t
type of underlying poses (2D/3D).
virtual bool checkRegistrationConditionPose(const mrpt::poses::CPose2D &p1, const mrpt::poses::CPose2D &p2) const
void dumpToTextStream(std::ostream &out) const
This method should clearly display all the contents of the structure in textual form,...
double yaw() const
Get the YAW angle (in radians)
virtual void loadParams(const std::string &source_fname)
Load the necessary for the decider/optimizer configuration parameters.
This base provides a set of functions for maths stuff.
GLsizei const GLchar ** string
GLenum const GLfloat * params
void asString(std::string &s) const
Returns a human-readable textual representation of the object (eg: "[x y z yaw pitch roll]",...
double DEG2RAD(const double x)
Degrees to radians.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at mié 12 jul 2023 10:03:34 CEST | |