This virtual class is the base for SLAM implementations.
See derived classes for more information.
Definition at line 35 of file CMetricMapBuilder.h.
#include <mrpt/slam/CMetricMapBuilder.h>
Classes | |
struct | TOptions |
Options for the algorithm. More... | |
Public Member Functions | |
CMetricMapBuilder () | |
Constructor. More... | |
virtual | ~CMetricMapBuilder () |
Destructor. More... | |
void | clear () |
Clear all elements of the maps, and reset localization to (0,0,0deg). More... | |
void | enableMapUpdating (bool enable) |
Enables or disables the map updating (default state is enabled) More... | |
void | loadCurrentMapFromFile (const std::string &fileName) |
Load map (mrpt::maps::CSimpleMap) from a ".simplemap" file. More... | |
void | saveCurrentMapToFile (const std::string &fileName, bool compressGZ=true) const |
Save map (mrpt::maps::CSimpleMap) to a ".simplemap" file. More... | |
Pure virtual methods to implement in any particular SLAM algorithm | |
virtual void | initialize (const mrpt::maps::CSimpleMap &initialMap=mrpt::maps::CSimpleMap(), mrpt::poses::CPosePDF *x0=NULL)=0 |
Initialize the method, starting with a known location PDF "x0"(if supplied, set to NULL to left unmodified) and a given fixed, past map. More... | |
virtual mrpt::poses::CPose3DPDFPtr | getCurrentPoseEstimation () const =0 |
Returns a copy of the current best pose estimation as a pose PDF. More... | |
virtual void | processActionObservation (mrpt::obs::CActionCollection &action, mrpt::obs::CSensoryFrame &observations)=0 |
Process a new action and observations pair to update this map: See the description of the class at the top of this page to see a more complete description. More... | |
virtual void | getCurrentlyBuiltMap (mrpt::maps::CSimpleMap &out_map) const =0 |
Fills "out_map" with the set of "poses"-"sensory-frames", thus the so far built map. More... | |
virtual unsigned int | getCurrentlyBuiltMapSize ()=0 |
Returns just how many sensory-frames are stored in the currently build map. More... | |
virtual const mrpt::maps::CMultiMetricMap * | getCurrentlyBuiltMetricMap () const =0 |
Returns the map built so far. More... | |
virtual void | saveCurrentEstimationToImage (const std::string &file, bool formatEMF_BMP=true)=0 |
A useful method for debugging: the current map (and/or poses) estimation is dumped to an image file. More... | |
Public Attributes | |
TOptions | options |
Protected Member Functions | |
void | enterCriticalSection () |
Enter critical section for map updating. More... | |
void | leaveCriticalSection () |
Leave critical section for map updating. More... | |
Protected Attributes | |
mrpt::synch::CCriticalSection | critZoneChangingMap |
Critical zones. More... | |
CMetricMapBuilder::CMetricMapBuilder | ( | ) |
|
virtual |
void CMetricMapBuilder::clear | ( | ) |
Clear all elements of the maps, and reset localization to (0,0,0deg).
Definition at line 42 of file CMetricMapBuilder.cpp.
References initialize(), and MRPT_LOG_DEBUG.
|
inline |
Enables or disables the map updating (default state is enabled)
Definition at line 88 of file CMetricMapBuilder.h.
|
inlineprotected |
Enter critical section for map updating.
Definition at line 40 of file CMetricMapBuilder.h.
References mrpt::synch::CCriticalSection::enter().
Referenced by mrpt::slam::CMetricMapBuilderICP::getCurrentMapPoints(), and mrpt::slam::CMetricMapBuilderICP::~CMetricMapBuilderICP().
|
pure virtual |
Fills "out_map" with the set of "poses"-"sensory-frames", thus the so far built map.
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
Referenced by saveCurrentMapToFile().
|
pure virtual |
Returns just how many sensory-frames are stored in the currently build map.
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
|
pure virtual |
Returns the map built so far.
NOTE that for efficiency a pointer to the internal object is passed, DO NOT delete nor modify the object in any way, if desired, make a copy of ir with "duplicate()".
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
|
pure virtual |
Returns a copy of the current best pose estimation as a pose PDF.
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
|
pure virtual |
Initialize the method, starting with a known location PDF "x0"(if supplied, set to NULL to left unmodified) and a given fixed, past map.
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
Referenced by clear(), and loadCurrentMapFromFile().
|
inlineprotected |
Leave critical section for map updating.
Definition at line 42 of file CMetricMapBuilder.h.
References mrpt::synch::CCriticalSection::leave().
Referenced by mrpt::slam::CMetricMapBuilderICP::getCurrentMapPoints(), and mrpt::slam::CMetricMapBuilderICP::~CMetricMapBuilderICP().
void CMetricMapBuilder::loadCurrentMapFromFile | ( | const std::string & | fileName | ) |
Load map (mrpt::maps::CSimpleMap) from a ".simplemap" file.
Definition at line 56 of file CMetricMapBuilder.cpp.
References mrpt::maps::CSimpleMap::clear(), mrpt::system::fileExists(), initialize(), MRPT_LOG_INFO_STREAM, and MRPT_LOG_WARN_STREAM.
Referenced by mrpt::slam::CMetricMapBuilderICP::setCurrentMapFile().
|
pure virtual |
Process a new action and observations pair to update this map: See the description of the class at the top of this page to see a more complete description.
action | The estimation of the incremental pose change in the robot pose. |
observations | The set of observations that robot senses at the new pose. |
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
|
pure virtual |
A useful method for debugging: the current map (and/or poses) estimation is dumped to an image file.
file | The output file name |
formatEMF_BMP | Output format = true:EMF, false:BMP |
Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.
void CMetricMapBuilder::saveCurrentMapToFile | ( | const std::string & | fileName, |
bool | compressGZ = true |
||
) | const |
Save map (mrpt::maps::CSimpleMap) to a ".simplemap" file.
Definition at line 82 of file CMetricMapBuilder.cpp.
References CFileGZOutputStream, getCurrentlyBuiltMap(), and MRPT_LOG_INFO_STREAM.
Referenced by mrpt::slam::CMetricMapBuilderICP::setCurrentMapFile().
|
protected |
Critical zones.
Definition at line 38 of file CMetricMapBuilder.h.
Referenced by mrpt::slam::CMetricMapBuilderICP::initialize(), mrpt::slam::CMetricMapBuilderRBPF::initialize(), mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::slam::CMetricMapBuilderICP::processObservation().
TOptions mrpt::slam::CMetricMapBuilder::options |
Definition at line 124 of file CMetricMapBuilder.h.
Referenced by mrpt::slam::CMetricMapBuilderRBPF::processActionObservation(), and mrpt::slam::CMetricMapBuilderICP::processObservation().
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |