MRPT logo

mrpt::slam::CMetricMapBuilderICP Class Reference

A class for very simple 2D SLAM based on ICP. More...

#include <mrpt/slam/CMetricMapBuilderICP.h>

Inheritance diagram for mrpt::slam::CMetricMapBuilderICP:

mrpt::slam::CMetricMapBuilder mrpt::utils::CDebugOutputCapable

List of all members.

Classes

struct  TConfigParams
 Algorithm configuration params. More...

Public Member Functions

 CMetricMapBuilderICP (TSetOfMetricMapInitializers *mapInitializers, float insertionLinDistance=1.0f, float insertionAngDistance=DEG2RAD(30), CICP::TConfigParams *icpParams=NULL)
 Constructor.
virtual ~CMetricMapBuilderICP ()
 Destructor:.
void initialize (CSensFrameProbSequence &initialMap, CPosePDF *x0=NULL)
 Initialize the method, starting with a known location PDF "x0"(if supplied, set to NULL to left unmodified) and a given fixed, past map.
CPose3DPDFPtr getCurrentPoseEstimation () const
 Returns a copy of the current best pose estimation as a pose PDF.
void setCurrentMapFile (const char *mapFile)
 Sets the "current map file", thus that map will be loaded if it exists or a new one will be created if it does not, and the updated map will be save to that file when destroying the object.
void processActionObservation (CActionCollection &action, CSensoryFrame &in_SF)
 Appends a new action and observations to update this map: See the description of the class at the top of this page to see a more complete description.
void getCurrentlyBuiltMap (CSensFrameProbSequence &out_map)
 Fills "out_map" with the set of "poses"-"sensorial frames", thus the so far built map.
void getCurrentMapPoints (vector_float &x, vector_float &y)
 (DEPRECATED) Returns the 2D points of current local map: This is for backward compatibility with the non-BABEL GUI, should be removed when a new GUI integrated into BABEL becomes available.
CMultiMetricMapgetCurrentlyBuiltMetricMap ()
 Returns the map built so far.
unsigned int getCurrentlyBuiltMapSize ()
 Returns just how many sensorial frames are stored in the currently build map.
void saveCurrentEstimationToImage (const std::string &file, bool formatEMF_BMP=true)
 A useful method for debugging: the current map (and/or poses) estimation is dumped to an image file.

Public Attributes

struct MRPTDLLIMPEXP
mrpt::slam::CMetricMapBuilderICP::TConfigParams 
ICP_options
 Algorithm configuration params.
CICP::TConfigParams ICP_params

Private Attributes

CSensFrameProbSequence SF_Poses_seq
 The set of observations that leads to current map:.
CMultiMetricMap metricMap
 The metric map representation as a points map:.
bool isTheFirstObservation
 Is map updating enabled?
std::string currentMapFile
 Current map file.
CPosePDFGaussian estPose
 The pose estimation by the alignment algorithm (ICP).
std::deque< CPose2DestRobotPath
 The threshold [0,1] for map update, based on good localization and new information.
float insertionLinDistance
 Distances (linear and angular) for inserting a new observation into the map.
float insertionAngDistance
float linDistSinceLast
 Traveled distances from last insertion(map update): They are reset at each map update.
float angDistSinceLast


Detailed Description

A class for very simple 2D SLAM based on ICP.

This is a non-probabilistic pose tracking algorithm. Map are stored as in files as binary dumps of "mrpt::slam::CSensFrameProbSequence" objects. The methods are thread-safe.

Definition at line 42 of file CMetricMapBuilderICP.h.


Constructor & Destructor Documentation

mrpt::slam::CMetricMapBuilderICP::CMetricMapBuilderICP ( TSetOfMetricMapInitializers mapInitializers,
float  insertionLinDistance = 1.0f,
float  insertionAngDistance = DEG2RAD(30),
CICP::TConfigParams icpParams = NULL 
)

Constructor.

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

Destructor:.


Member Function Documentation

void mrpt::slam::CMetricMapBuilderICP::getCurrentlyBuiltMap ( CSensFrameProbSequence out_map  )  [virtual]

Fills "out_map" with the set of "poses"-"sensorial frames", thus the so far built map.

Implements mrpt::slam::CMetricMapBuilder.

unsigned int mrpt::slam::CMetricMapBuilderICP::getCurrentlyBuiltMapSize (  )  [virtual]

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

Implements mrpt::slam::CMetricMapBuilder.

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

Implements mrpt::slam::CMetricMapBuilder.

void mrpt::slam::CMetricMapBuilderICP::getCurrentMapPoints ( vector_float x,
vector_float y 
)

(DEPRECATED) Returns the 2D points of current local map: This is for backward compatibility with the non-BABEL GUI, should be removed when a new GUI integrated into BABEL becomes available.

CPose3DPDFPtr mrpt::slam::CMetricMapBuilderICP::getCurrentPoseEstimation (  )  const [virtual]

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

Implements mrpt::slam::CMetricMapBuilder.

void mrpt::slam::CMetricMapBuilderICP::initialize ( CSensFrameProbSequence initialMap,
CPosePDF x0 = NULL 
) [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.

Implements mrpt::slam::CMetricMapBuilder.

void mrpt::slam::CMetricMapBuilderICP::processActionObservation ( CActionCollection action,
CSensoryFrame in_SF 
) [virtual]

Appends a new action and observations to update this map: See the description of the class at the top of this page to see a more complete description.

Parameters:
action The estimation of the incremental pose change in the robot pose.
in_SF The set of observations that robot senses at the new pose. See params in CMetricMapBuilder::options and CMetricMapBuilderICP::ICP_options

Implements mrpt::slam::CMetricMapBuilder.

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

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

Parameters:
file The output file name
formatEMF_BMP Output format = true:EMF, false:BMP

Implements mrpt::slam::CMetricMapBuilder.

void mrpt::slam::CMetricMapBuilderICP::setCurrentMapFile ( const char *  mapFile  ) 

Sets the "current map file", thus that map will be loaded if it exists or a new one will be created if it does not, and the updated map will be save to that file when destroying the object.


Member Data Documentation

Definition at line 165 of file CMetricMapBuilderICP.h.

Current map file.

Definition at line 144 of file CMetricMapBuilderICP.h.

The pose estimation by the alignment algorithm (ICP).

Definition at line 148 of file CMetricMapBuilderICP.h.

The threshold [0,1] for map update, based on good localization and new information.

The estimated robot path:

Definition at line 156 of file CMetricMapBuilderICP.h.

Algorithm configuration params.

Definition at line 74 of file CMetricMapBuilderICP.h.

Definition at line 160 of file CMetricMapBuilderICP.h.

Distances (linear and angular) for inserting a new observation into the map.

Definition at line 160 of file CMetricMapBuilderICP.h.

Is map updating enabled?

To always insert the first observation:

Definition at line 140 of file CMetricMapBuilderICP.h.

Traveled distances from last insertion(map update): They are reset at each map update.

See also:
insertionLinDistance, insertionAngDistance

Definition at line 165 of file CMetricMapBuilderICP.h.

The metric map representation as a points map:.

Definition at line 132 of file CMetricMapBuilderICP.h.

The set of observations that leads to current map:.

Definition at line 128 of file CMetricMapBuilderICP.h.




Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:19:01 EST 2009