10 #include <mrpt/math/utils.h> 13 #include <mrpt/version.h> 14 #if MRPT_VERSION>=0x199 15 #include <mrpt/containers/stl_containers_utils.h> 16 using namespace mrpt::containers;
27 const mrpt::poses::CPosePDF& pdf,
28 const mrpt::slam::CGridMapAligner::TReturnInfo& ret_info) {
30 CPosePDFSOG::Ptr pdf_out = CPosePDFSOG::Create();
31 pdf_out->copyFrom(pdf);
32 CPose2D pose_out; CMatrixDouble33 cov_out;
33 pdf_out->getMostLikelyCovarianceAndMean(cov_out, pose_out);
36 ss <<
"--------------------" << endl;
37 ss <<
"Results: " << endl
38 <<
"\tPDFPtr pose: " << pdf.getMeanVal() << endl
39 <<
"\t# Correspondences: " << ret_info.correspondences.size() << endl
40 <<
"\tAlignment goodness: " << ret_info.goodness << endl
41 <<
"\tModes size: " << pdf_out->size() << endl
42 <<
"\tModes: " << endl << getSTLContainerAsString(pdf_out->getSOGModes())
43 <<
"\tMost likely pose: " << pose_out << endl
44 <<
"\tCorresponding covariance matrix: " << endl
46 ss <<
"--------------------" << endl;
51 const mrpt::poses::CPose2D& p) {
54 approximatelyEqual(p.x(), 0.0, epsilon) &&
55 approximatelyEqual(p.y(), 0.0, epsilon) &&
56 approximatelyEqual(p.phi(), 0.0, epsilon));
std::string getGridMapAlignmentResultsAsString(const mrpt::poses::CPosePDF &pdf, const mrpt::slam::CGridMapAligner::TReturnInfo &ret_info)
bool isEssentiallyZero(const mrpt::poses::CPose2D &p)