12 #ifdef HTMSLAM_HAS_FABMAP 13 # include <FabMapLibInterface.h> 14 # define THE_FABMAP static_cast<fabmap::FabMapInstance*>(m_fabmap) 25 CTopLCDetector_FabMap::CTopLCDetector_FabMap(
CHMTSLAM *hmtslam) :
29 #ifdef HTMSLAM_HAS_FABMAP 33 unsigned int nVocabSize;
40 cout <<
"[CTopLCDetector_FabMap::constructor] Resetting FabMap" << endl;
41 THE_FABMAP->hmtslam_restart();
43 THROW_EXCEPTION(
"Please, recompile MRPT with FabMap to use this class.")
49 #ifdef HTMSLAM_HAS_FABMAP 61 const CHMHMapNodePtr ¤tArea,
62 const CHMHMapNodePtr &refArea,
68 return CPose3DPDFPtr();
78 #ifdef HTMSLAM_HAS_FABMAP 80 vector<string> lstObsImages;
83 CObservationImagePtr obsIm;
87 obsIm->image.getExternalStorageFileAbsolutePath(path);
88 lstObsImages.push_back(path);
92 if (lstObsImages.empty())
return;
94 cout <<
"[OnNewPose] Adding new pose: " << poseID <<
" # of images: " << lstObsImages.size() << endl;
95 THE_FABMAP->hmtslam_addNewPose(poseID,lstObsImages);
107 vocab_path(
"./vocab"),
108 vocabName(
"vocab_name"),
109 p_obs_given_exists(0.39),
110 p_at_new_place(0.99),
129 out.
printf(
"\n----------- [CTopLCDetector_FabMap::TOptions] ------------ \n\n");
Declares a class derived from "CObservation" that encapsules an image from a camera, whose relative pose to robot is also stored.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void OnNewPose(const TPoseID &poseID, const mrpt::obs::CSensoryFrame *SF)
Hook method for being warned about the insertion of a new poses into the maps.
CTopLCDetector_FabMap::TOptions TLC_fabmap_options
Options passed to this TLC constructor.
Classes related to the implementation of Hybrid Metric Topological (HMT) SLAM.
#define THROW_EXCEPTION(msg)
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
TOptions()
Initialization of default params.
uint64_t TPoseID
An integer number uniquely identifying each robot pose stored in HMT-SLAM.
An implementation of Hybrid Metric Topological SLAM (HMT-SLAM).
This class allows loading and storing values and vectors of different types from a configuration text...
int64_t THypothesisID
An integer number uniquely identifying each of the concurrent hypotheses for the robot topological pa...
double p_obs_given_exists
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
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...
mrpt::hmtslam::CHMTSLAM::TOptions m_options
This namespace provides multitask, synchronization utilities.
The virtual base class for Topological Loop-closure Detectors; used in HMT-SLAM.
GLsizei const GLchar ** string
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
#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...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Options for a TLC-detector of type FabMap, used from CHMTSLAM.
mrpt::poses::CPose3DPDFPtr computeTopologicalObservationModel(const THypothesisID &hypID, const CHMHMapNodePtr ¤tArea, const CHMHMapNodePtr &refArea, double &out_log_lik)
This method must compute the topological observation model.
T::Ptr getObservationByClass(const size_t &ith=0) const
Returns the i'th observation of a given class (or of a descendant class), or NULL if there is no such...
virtual ~CTopLCDetector_FabMap()
Destructor.
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string §ion) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.