25 CTopLCDetector_GridMatching::CTopLCDetector_GridMatching(
CHMTSLAM* hmtslam)
73 hMapRef.get(), initEstimate, info);
77 hMapCur->m_gridMaps[0]->saveAsBitmapFileWithLandmarks(
"map1.png", info.
landmarks_map1.get());
78 hMapRef->m_gridMaps[0]->saveAsBitmapFileWithLandmarks(
"map2.png", info.
landmarks_map2.get());
89 const std::string dbg_dir =
96 const std::string filStat =
98 "/state_%05i_test_%i_%i.hmtslam", cnt,
99 (
int)currentArea->getID(), (int)refArea->getID());
100 const std::string filRes =
102 "/state_%05i_test_%i_%i_result.txt", cnt,
103 (
int)currentArea->getID(), (int)refArea->getID());
118 (
int)std::dynamic_pointer_cast<CPosePDFSOG>(alignRes)->
size());
119 f_res.
printf(
"ICP goodness: ");
133 [[maybe_unused]]
const TPoseID& poseID,
144 matchingOptions.loadFromConfigFile(source, section);
150 std::ostream&
out)
const 152 out <<
"\n----------- [CTopLCDetector_GridMatching::TOptions] ------------ " 154 matchingOptions.dumpToTextStream(
out);
mrpt::poses::CPosePDF::Ptr Align(const mrpt::maps::CMetricMap *m1, const mrpt::maps::CMetricMap *m2, const mrpt::poses::CPose2D &grossEst, mrpt::optional_ref< TMetricMapAlignmentResult > outInfo=std::nullopt)
The method for aligning a pair of metric maps, for SE(2) relative poses.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
bool createDirectory(const std::string &dirName)
Creates a directory.
void logFmt(const VerbosityLevel level, const char *fmt,...) const MRPT_printf_format_check(3
Alternative logging method, which mimics the printf behavior.
A class for aligning two multi-metric maps (with an occupancy grid maps and a points map...
std::string std::string format(std::string_view fmt, ARGS &&... args)
size_t size(const MATRIXLIKE &m, const int dim)
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
uint64_t TPoseID
An integer number uniquely identifying each robot pose stored in HMT-SLAM.
mrpt::slam::CGridMapAligner::TConfigParams matchingOptions
Options for the grid-to-grid matching algorithm.
bool saveState(mrpt::serialization::CArchive &out) const
Save the state of the whole HMT-SLAM framework to some binary stream (e.g.
CTopLCDetector_GridMatching::TOptions TLC_grid_options
Options passed to this TLC constructor.
The ICP algorithm return information.
An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).
TOptions()
Initialization of default params.
CArchiveStreamBase< STREAM > archiveFrom(STREAM &s)
Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream.
#define ASSERT_(f)
Defines an assertion mechanism.
This class allows loading and storing values and vectors of different types from a configuration text...
std::string LOG_OUTPUT_DIR
[LOGGING] If it is not an empty string (""), a directory with that name will be created and log files...
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string §ion) override
This method load the options from a ".ini"-like file or memory-stored string list.
This namespace contains representation of robot actions and observations.
void OnNewPose(const TPoseID &poseID, const mrpt::obs::CSensoryFrame *SF) override
Hook method for being warned about the insertion of a new poses into the maps.
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
mrpt::hmtslam::CHMTSLAM::TOptions m_options
The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.
This CStream derived class allow using a file as a write-only, binary stream.
#define NODE_ANNOTATION_METRIC_MAPS
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
mrpt::maps::CLandmarksMap::Ptr landmarks_map1
The landmarks of each map (the indices of these landmarks correspond to those in "correspondences") ...
A class for storing an occupancy grid map.
std::vector< double > icp_goodness_all_sog_modes
The ICP goodness of all potential SOG modes at the stage "sog2", thus before the removing of "bad" IC...
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
Options for a TLC-detector of type gridmap-matching, used from CHMTSLAM.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
mrpt::vision::TStereoCalibResults out
~CTopLCDetector_GridMatching() override
Destructor.
mrpt::slam::CGridMapAligner::TConfigParams options
mrpt::maps::CLandmarksMap::Ptr landmarks_map2
Saves data to a file and transparently compress the data using the given compression level...
mrpt::poses::CPose3DPDF::Ptr computeTopologicalObservationModel(const THypothesisID &hypID, const CHMHMapNode::Ptr ¤tArea, const CHMHMapNode::Ptr &refArea, double &out_log_lik) override
This method must compute the topological observation model.
This class stores any customizable set of metric maps.
void dumpToConsole() const
Just like dumpToTextStream() but sending the text to the console (std::cout)
virtual int void printf_vector(const char *fmt, const CONTAINER_TYPE &V, char separator=',')
Prints a vector in the format [A,B,C,...] using CStream::printf, and the fmt string for each vector e...