Go to the documentation of this file.
12 #ifdef HTMSLAM_HAS_FABMAP
13 #include <FabMapLibInterface.h>
14 #define THE_FABMAP static_cast<fabmap::FabMapInstance*>(m_fabmap)
23 CTopLCDetector_FabMap::CTopLCDetector_FabMap(
CHMTSLAM* hmtslam)
26 #ifdef HTMSLAM_HAS_FABMAP
31 unsigned int nVocabSize;
32 if (!fabmap::ParseOXV_PeekDimensions(
35 "Error parsing vocabulary file: %s",
38 m_fabmap =
new fabmap::FabMapInstance(
43 cout <<
"[CTopLCDetector_FabMap::constructor] Resetting FabMap" << endl;
44 THE_FABMAP->hmtslam_restart();
46 THROW_EXCEPTION(
"Please, recompile MRPT with FabMap to use this class.");
52 #ifdef HTMSLAM_HAS_FABMAP
67 [[maybe_unused]]
double& out_log_lik)
77 [[maybe_unused]]
const TPoseID& poseID,
80 #ifdef HTMSLAM_HAS_FABMAP
82 vector<string> lstObsImages;
89 obsIm->image.getExternalStorageFileAbsolutePath(path);
90 lstObsImages.push_back(path);
94 if (lstObsImages.empty())
return;
96 cout <<
"[OnNewPose] Adding new pose: " << poseID
97 <<
" # of images: " << lstObsImages.size() << endl;
98 THE_FABMAP->hmtslam_addNewPose(poseID, lstObsImages);
104 : vocab_path(
"./vocab"), vocabName(
"vocab_name")
124 out <<
"\n----------- [CTopLCDetector_FabMap::TOptions] ------------ \n\n";
~CTopLCDetector_FabMap() override
Destructor.
std::shared_ptr< mrpt::hmtslam ::CHMHMapNode > Ptr
#define MRPT_LOAD_CONFIG_VAR( variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).
std::shared_ptr< mrpt::obs ::CObservationImage > Ptr
mrpt::vision::TStereoCalibResults out
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define THROW_EXCEPTION(msg)
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
This namespace contains representation of robot actions and observations.
Declares a class for storing a "sensory frame", a set of "observations" taken by the robot approximat...
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
CTopLCDetector_FabMap::TOptions TLC_fabmap_options
Options passed to this TLC constructor.
This class allows loading and storing values and vectors of different types from a configuration text...
TOptions()
Initialization of default params.
string iniFile(myDataDir+string("benchmark-options.ini"))
double p_obs_given_exists
Options for a TLC-detector of type FabMap, used from CHMTSLAM.
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.
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
mrpt::hmtslam::CHMTSLAM::TOptions m_options
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.
uint64_t TPoseID
An integer number uniquely identifying each robot pose stored in HMT-SLAM.
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
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.
std::shared_ptr< CPose3DPDF > Ptr
The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.
Declares a class derived from "CObservation" that encapsules an image from a camera,...
Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020 | |