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

Detailed Description

A 2D grid map representing the reflectivity of the environment (for example, measured with an IR proximity sensor).

Important implemented features are:

Each cell contains the up-to-date average height from measured falling in that cell. Algorithms that can be used:

#include <mrpt/slam/CReflectivityGridMap2D.h>

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

List of all members.

Classes

struct  TInsertionOptions
 Parameters related with inserting observations into the map. More...

Public Member Functions

void clear ()
 Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes.
float cell2float (const int8_t &c) const
 CReflectivityGridMap2D (float x_min=-2, float x_max=2, float y_min=-2, float y_max=2, float resolution=0.1)
 Constructor.
bool isEmpty () const
 Returns true if the map is empty/no observation has been inserted.
double computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom)
 Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map.
float compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float minDistForCorr=0.10f, float minMahaDistForCorr=2.0f) const
 Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.
void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const
 The implementation in this class just calls all the corresponding method of the contained metric maps.
void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const
 Returns a 3D object representing the map: by default, it will be a mrpt::opengl::CMesh object, unless it is specified otherwise in mrpt::
void getAsImage (utils::CImage &img, bool verticalFlip=false, bool forceRGB=false) const
 Returns the grid as a 8-bit graylevel image, where each pixel is a cell (output image is RGB only if forceRGB is true)

Public Attributes

mrpt::slam::CReflectivityGridMap2D::TInsertionOptions insertionOptions

Protected Member Functions

virtual void internal_clear ()
 Erase all the contents of the map.
virtual bool internal_insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)
 Insert the observation information into this map.

Static Protected Attributes

static CLogOddsGridMapLUT< cell_t > m_logodd_lut
 Lookup tables for log-odds.

RTTI stuff

typedef CReflectivityGridMap2DPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CReflectivityGridMap2D
static mrpt::utils::TRuntimeClassId classCReflectivityGridMap2D
static const
mrpt::utils::TRuntimeClassId * 
classinfo
static const
mrpt::utils::TRuntimeClassId * 
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId * 
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObject * duplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObject * CreateObject ()
static CReflectivityGridMap2DPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 72 of file CReflectivityGridMap2D.h.


Constructor & Destructor Documentation

mrpt::slam::CReflectivityGridMap2D::CReflectivityGridMap2D ( float  x_min = -2,
float  x_max = 2,
float  y_min = -2,
float  y_max = 2,
float  resolution = 0.1 
)

Constructor.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CReflectivityGridMap2D::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::slam::CMetricMap.

float mrpt::slam::CReflectivityGridMap2D::cell2float ( const int8_t &  c) const [inline]

Definition at line 84 of file CReflectivityGridMap2D.h.

void mrpt::slam::CReflectivityGridMap2D::clear ( void  ) [inline]

Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes.

Reimplemented from mrpt::slam::CMetricMap.

Definition at line 82 of file CReflectivityGridMap2D.h.

References mrpt::slam::CMetricMap::clear().

float mrpt::slam::CReflectivityGridMap2D::compute3DMatchingRatio ( const CMetricMap *  otherMap,
const CPose3D &  otherMapPose,
float  minDistForCorr = 0.10f,
float  minMahaDistForCorr = 2.0f 
) const [virtual]

Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.

This method always return 0 for grid maps.

Parameters:
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The 6D pose of the other map as seen from "this".
minDistForCorr[IN] The minimum distance between 2 non-probabilistic map elements for counting them as a correspondence.
minMahaDistForCorr[IN] The minimum Mahalanobis distance between 2 probabilistic map elements for counting them as a correspondence.
Returns:
The matching ratio [0,1]
See also:
computeMatchingWith2D

Implements mrpt::slam::CMetricMap.

double mrpt::slam::CReflectivityGridMap2D::computeObservationLikelihood ( const CObservation *  obs,
const CPose3D &  takenFrom 
) [virtual]

Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map.

Parameters:
takenFromThe robot's pose the observation is supposed to be taken from.
obsThe observation.
Returns:
This method returns a likelihood in the range [0,1].
See also:
Used in particle filter algorithms, see: CMultiMetricMapPDF::update

Implements mrpt::slam::CMetricMap.

static CReflectivityGridMap2DPtr mrpt::slam::CReflectivityGridMap2D::Create ( ) [static]
static mrpt::utils::CObject* mrpt::slam::CReflectivityGridMap2D::CreateObject ( ) [static]
virtual mrpt::utils::CObject* mrpt::slam::CReflectivityGridMap2D::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

void mrpt::slam::CReflectivityGridMap2D::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &  outObj) const [virtual]

Returns a 3D object representing the map: by default, it will be a mrpt::opengl::CMesh object, unless it is specified otherwise in mrpt::

Implements mrpt::slam::CMetricMap.

void mrpt::slam::CReflectivityGridMap2D::getAsImage ( utils::CImage &  img,
bool  verticalFlip = false,
bool  forceRGB = false 
) const

Returns the grid as a 8-bit graylevel image, where each pixel is a cell (output image is RGB only if forceRGB is true)

virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CReflectivityGridMap2D::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::slam::CMetricMap.

virtual void mrpt::slam::CReflectivityGridMap2D::internal_clear ( ) [protected, virtual]

Erase all the contents of the map.

Implements mrpt::slam::CMetricMap.

virtual bool mrpt::slam::CReflectivityGridMap2D::internal_insertObservation ( const CObservation *  obs,
const CPose3D *  robotPose = NULL 
) [protected, virtual]

Insert the observation information into this map.

This method must be implemented in derived classes.

Parameters:
obsThe observation
robotPoseThe 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use CPose2D(0,0,deg)
See also:
CObservation::insertObservationInto

Implements mrpt::slam::CMetricMap.

bool mrpt::slam::CReflectivityGridMap2D::isEmpty ( ) const [virtual]

Returns true if the map is empty/no observation has been inserted.

Implements mrpt::slam::CMetricMap.

void mrpt::slam::CReflectivityGridMap2D::saveMetricMapRepresentationToFile ( const std::string &  filNamePrefix) const [virtual]

The implementation in this class just calls all the corresponding method of the contained metric maps.

Implements mrpt::slam::CMetricMap.


Member Data Documentation

Definition at line 72 of file CReflectivityGridMap2D.h.

Definition at line 72 of file CReflectivityGridMap2D.h.

Definition at line 72 of file CReflectivityGridMap2D.h.

Lookup tables for log-odds.

Definition at line 75 of file CReflectivityGridMap2D.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011