Main MRPT website > C++ reference
MRPT logo
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
mrpt::slam::CMetricMapBuilder Class Reference

Detailed Description

This virtual class is the base for SLAM implementations.

See derived classes for more information.

See also:
CMetricMap

#include <mrpt/slam/CMetricMapBuilder.h>

Inheritance diagram for mrpt::slam::CMetricMapBuilder:
Inheritance graph
[legend]

List of all members.

Classes

struct  TOptions
 Options for the algorithm. More...

Public Member Functions

 CMetricMapBuilder ()
 Constructor.
virtual ~CMetricMapBuilder ()
 Destructor.
void clear ()
 Clear all elements of the maps, and reset localization to (0,0,0deg).
void enableMapUpdating (bool enable)
 Enables or disables the map updating (default state is enabled)
void loadCurrentMapFromFile (const std::string &fileName)
 Load map (mrpt::slam::CSimpleMap) from a ".simplemap" file.
void saveCurrentMapToFile (const std::string &fileName, bool compressGZ=true) const
 Save map (mrpt::slam::CSimpleMap) to a ".simplemap" file.
Pure virtual methods to implement in any particular SLAM algorithm
virtual void initialize (const CSimpleMap &initialMap=CSimpleMap(), 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.
virtual CPose3DPDFPtr getCurrentPoseEstimation () const =0
 Returns a copy of the current best pose estimation as a pose PDF.
virtual void processActionObservation (CActionCollection &action, 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.
virtual void getCurrentlyBuiltMap (CSimpleMap &out_map) const =0
 Fills "out_map" with the set of "poses"-"sensory-frames", thus the so far built map.
virtual unsigned int getCurrentlyBuiltMapSize ()=0
 Returns just how many sensory-frames are stored in the currently build map.
virtual CMultiMetricMapgetCurrentlyBuiltMetricMap ()=0
 Returns the map built so far.
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.

Static Public Member Functions

static void printf_debug (const char *frmt,...)
 Sends a formated text to "debugOut" if not NULL, or to cout otherwise.

Public Attributes

TOptions options

Protected Member Functions

void enterCriticalSection ()
 Enter critical section for map updating:
void leaveCriticalSection ()
 Leave critical section for map updating:

Protected Attributes

synch::CCriticalSection critZoneChangingMap
 Critical zones.

Constructor & Destructor Documentation

mrpt::slam::CMetricMapBuilder::CMetricMapBuilder ( )

Constructor.

virtual mrpt::slam::CMetricMapBuilder::~CMetricMapBuilder ( ) [virtual]

Destructor.


Member Function Documentation

void mrpt::slam::CMetricMapBuilder::clear ( )

Clear all elements of the maps, and reset localization to (0,0,0deg).

Reimplemented in mrpt::slam::CMetricMapBuilderRBPF.

void mrpt::slam::CMetricMapBuilder::enableMapUpdating ( bool  enable) [inline]

Enables or disables the map updating (default state is enabled)

Definition at line 114 of file CMetricMapBuilder.h.

void mrpt::slam::CMetricMapBuilder::enterCriticalSection ( ) [inline, protected]

Enter critical section for map updating:

Definition at line 63 of file CMetricMapBuilder.h.

virtual void mrpt::slam::CMetricMapBuilder::getCurrentlyBuiltMap ( CSimpleMap out_map) const [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.

virtual unsigned int mrpt::slam::CMetricMapBuilder::getCurrentlyBuiltMapSize ( ) [pure virtual]

Returns just how many sensory-frames are stored in the currently build map.

Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.

virtual CMultiMetricMap* mrpt::slam::CMetricMapBuilder::getCurrentlyBuiltMetricMap ( ) [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.

virtual CPose3DPDFPtr mrpt::slam::CMetricMapBuilder::getCurrentPoseEstimation ( ) const [pure virtual]

Returns a copy of the current best pose estimation as a pose PDF.

Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.

virtual void mrpt::slam::CMetricMapBuilder::initialize ( const CSimpleMap initialMap = CSimpleMap(),
CPosePDF x0 = NULL 
) [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.

void mrpt::slam::CMetricMapBuilder::leaveCriticalSection ( ) [inline, protected]

Leave critical section for map updating:

Definition at line 67 of file CMetricMapBuilder.h.

void mrpt::slam::CMetricMapBuilder::loadCurrentMapFromFile ( const std::string fileName)

Load map (mrpt::slam::CSimpleMap) from a ".simplemap" file.

static void mrpt::utils::CDebugOutputCapable::printf_debug ( const char *  frmt,
  ... 
) [static, inherited]

Sends a formated text to "debugOut" if not NULL, or to cout otherwise.

Referenced by mrpt::math::CLevenbergMarquardtTempl::execute().

virtual void mrpt::slam::CMetricMapBuilder::processActionObservation ( CActionCollection action,
CSensoryFrame observations 
) [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.

Parameters:
actionThe estimation of the incremental pose change in the robot pose.
observationsThe set of observations that robot senses at the new pose.

Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.

virtual void mrpt::slam::CMetricMapBuilder::saveCurrentEstimationToImage ( const std::string file,
bool  formatEMF_BMP = true 
) [pure virtual]

A useful method for debugging: the current map (and/or poses) estimation is dumped to an image file.

Parameters:
fileThe output file name
formatEMF_BMPOutput format = true:EMF, false:BMP

Implemented in mrpt::slam::CMetricMapBuilderRBPF, and mrpt::slam::CMetricMapBuilderICP.

void mrpt::slam::CMetricMapBuilder::saveCurrentMapToFile ( const std::string fileName,
bool  compressGZ = true 
) const

Save map (mrpt::slam::CSimpleMap) to a ".simplemap" file.


Member Data Documentation

Critical zones.

Definition at line 59 of file CMetricMapBuilder.h.

Definition at line 150 of file CMetricMapBuilder.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011