Main MRPT website > C++ reference
MRPT logo
List of all members | Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes
mrpt::slam::CWirelessPowerGridMap2D Class Reference

Detailed Description

CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.

There are a number of methods available to build the wifi grid-map, depending on the value of "TMapRepresentation maptype" passed in the constructor.

The following papers describe the mapping alternatives implemented here:

See Also
mrpt::slam::CRandomFieldGridMap2D, mrpt::slam::CMetricMap, mrpt::utils::CDynamicGrid, The application icp-slam, mrpt::slam::CMultiMetricMap

Definition at line 64 of file CWirelessPowerGridMap2D.h.

#include <mrpt/slam/CWirelessPowerGridMap2D.h>

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

Classes

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

Public Types

enum  TMapRepresentation {
  mrKernelDM = 0, mrAchim = 0, mrKalmanFilter, mrKalmanApproximate,
  mrKernelDMV
}
 The type of map representation to be used. More...
 

Public Member Functions

 CWirelessPowerGridMap2D (TMapRepresentation mapType=mrAchim, float x_min=-2, float x_max=2, float y_min=-2, float y_max=2, float resolution=0.1)
 Constructor.
 
virtual ~CWirelessPowerGridMap2D ()
 Destructor.
 
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.
 
virtual void getAsBitmapFile (mrpt::utils::CImage &out_img) const
 Returns an image just as described in saveAsBitmapFile.
 
void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const
 The implementation in this class just calls all the corresponding method of the contained metric maps.
 
void saveAsMatlab3DGraph (const std::string &filName) const
 Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.
 
void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const
 Returns a 3D object representing the map.
 
void clear ()
 Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes.
 
float cell2float (const TRandomFieldCell &c) const
 
virtual float cell2float (const TRandomFieldCell &c) const
 The user must implement this in order to provide "saveToTextFile" a way to convert each cell into a numeric value.
 
virtual bool isEmpty () const
 Returns true if the map is empty/no observation has been inserted (in this class it always return false, unless redefined otherwise in base classes)
 
virtual void saveAsBitmapFile (const std::string &filName) const
 Save the current map as a graphical file (BMP,PNG,...).
 
virtual void resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const TRandomFieldCell &defaultValueNewCells, float additionalMarginMeters=1.0f)
 Changes the size of the grid, maintaining previous contents.
 
virtual void resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const TRandomFieldCell &defaultValueNewCells, float additionalMarginMeters=2.0f)
 Changes the size of the grid, maintaining previous contents.
 
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 getAsMatlab3DGraphScript (std::string &out_script) const
 Return a large text block with a MATLAB script to plot the contents of this map.
 
virtual void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &meanObj, mrpt::opengl::CSetOfObjectsPtr &varObj) const
 Returns two 3D objects representing the mean and variance maps.
 
TMapRepresentation getMapType ()
 Return the type of the random-field grid map, according to parameters passed on construction.
 
virtual void predictMeasurement (const double &x, const double &y, double &out_predict_response, double &out_predict_response_variance)
 Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance).
 
void getMeanAndCov (vector_double &out_means, CMatrixDouble &out_cov) const
 Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods).
 
void loadFromProbabilisticPosesAndObservations (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map.
 
void loadFromSimpleMap (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map.
 
bool insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)
 Insert the observation information into this map.
 
bool insertObservationPtr (const CObservationPtr &obs, const CPose3D *robotPose=NULL)
 A wrapper for smart pointers, just calls the non-smart pointer version.
 
double computeObservationLikelihood (const CObservation *obs, const CPose2D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 2D pose.
 
virtual bool canComputeObservationLikelihood (const CObservation *obs)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.
 
double computeObservationsLikelihood (const CSensoryFrame &sf, const CPose2D &takenFrom)
 Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame.
 
bool canComputeObservationsLikelihood (const CSensoryFrame &sf)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.
 
virtual void computeMatchingWith2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPose2D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=true, bool onlyUniqueRobust=false, const size_t decimation_other_map_points=1, const size_t offset_other_map_points=0) const
 Computes the matchings between this and another 2D points map.
 
virtual void computeMatchingWith3D (const CMetricMap *otherMap, const CPose3D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPoint3D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=true, bool onlyUniqueRobust=false, const size_t decimation_other_map_points=1, const size_t offset_other_map_points=0) const
 Computes the matchings between this and another 3D points map - method used in 3D-ICP.
 
virtual void auxParticleFilterCleanUp ()
 This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".
 
virtual float squareDistanceToClosestCorrespondence (const float &x0, const float &y0) const
 Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
 
virtual const CSimplePointsMapgetAsSimplePointsMap () const
 If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.
 
virtual CSimplePointsMapgetAsSimplePointsMap ()
 
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
 
CObjectclone () const
 Cloning interface for smart pointers.
 
void setSize (float x_min, float x_max, float y_min, float y_max, float resolution)
 Changes the size of the grid, ERASING all previous contents.
 
void fill (const TRandomFieldCell &value)
 Fills all the cells with the same value.
 
TRandomFieldCellcellByPos (float x, float y)
 Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.
 
const TRandomFieldCellcellByPos (float x, float y) const
 Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.
 
TRandomFieldCellcellByIndex (unsigned int cx, unsigned int cy)
 Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.
 
const TRandomFieldCellcellByIndex (unsigned int cx, unsigned int cy) const
 Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.
 
size_t getSizeX () const
 Returns the horizontal size of grid map in cells count.
 
size_t getSizeY () const
 Returns the vertical size of grid map in cells count.
 
float getXMin () const
 Returns the "x" coordinate of left side of grid map.
 
float getXMax () const
 Returns the "x" coordinate of right side of grid map.
 
float getYMin () const
 Returns the "y" coordinate of top side of grid map.
 
float getYMax () const
 Returns the "y" coordinate of bottom side of grid map.
 
float getResolution () const
 Returns the resolution of the grid map.
 
void saveToTextFile (const std::string &fileName) const
 
int x2idx (float x) const
 Transform a coordinate values into cell indexes.
 
int x2idx (float x, float x_min) const
 Transform a coordinate value into a cell index, using a diferent "x_min" value.
 
int y2idx (float y) const
 
int y2idx (float y, float y_min) const
 
int xy2idx (float x, float y) const
 
void idx2cxcy (const int &idx, int &cx, int &cy) const
 Transform a global (linear) cell index value into its corresponding (x,y) cell indexes.
 
float idx2x (int cx) const
 Transform a cell index into a coordinate value.
 
float idx2y (int cy) const
 
void getAsMatrix (MAT &m) const
 Get the entire grid as a matrix.
 

Public Attributes

mrpt::slam::CWirelessPowerGridMap2D::TInsertionOptions insertionOptions
 
bool m_disableSaveAs3DObject
 When set to true (default=false), calling "getAs3DObject" will have no effects.
 

Static Public Attributes

static const
mrpt::utils::TRuntimeClassId 
classCObject
 
RTTI stuff
static const
mrpt::utils::TRuntimeClassId 
classCRandomFieldGridMap2D
 
RTTI stuff
static const
mrpt::utils::TRuntimeClassId 
classCMetricMap
 
RTTI stuff
static const
mrpt::utils::TRuntimeClassId 
classCSerializable
 

Protected Member Functions

virtual
CRandomFieldGridMap2D::TInsertionOptionsCommon
getCommonInsertOptions ()
 Get the part of the options common to all CRandomFieldGridMap2D classes.
 
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.
 
void insertObservation_KernelDM_DMV (float normReading, const CPose3D &sensorPose, bool is_DMV)
 The implementation of "insertObservation" for Achim Lilienthal's map models DM & DM+V.
 
void insertObservation_KF (float normReading, const CPose3D &sensorPose)
 The implementation of "insertObservation" for the (whole) Kalman Filter map model.
 
void insertObservation_KF2 (float normReading, const CPose3D &sensorPose)
 The implementation of "insertObservation" for the Efficient Kalman Filter map model.
 
double computeMeanCellValue_DM_DMV (const TRandomFieldCell *cell) const
 Computes the average cell concentration, or the overall average value if it has never been observed.
 
double computeVarCellValue_DM_DMV (const TRandomFieldCell *cell) const
 Computes the estimated variance of the cell concentration, or the overall average variance if it has never been observed.
 
void recoverMeanAndCov () const
 In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values.
 
void publishEvent (const mrptEvent &e) const
 Called when you want this object to emit an event to all the observers currently subscribed to this object.
 
bool hasSubscribers () const
 Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.
 
std::vector< TRandomFieldCell > & m_map_castaway_const () const
 Used only from logically const method that really need to modify the object.
 
CSerializable virtual methods
void writeToStream (mrpt::utils::CStream &out, int *getVersion) const
 Introduces a pure virtual method responsible for writing to a CStream.
 
void readFromStream (mrpt::utils::CStream &in, int version)
 Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
 

Protected Attributes

TInsertionOptionsCommonm_insertOptions_common
 Common options to all random-field grid maps: pointer that is set to the derived-class instance of "insertOptions" upon construction of this class.
 
TMapRepresentation m_mapType
 The map representation type of this map, as passed in the constructor.
 
CMatrixD m_cov
 The whole covariance matrix, used for the Kalman Filter map representation.
 
CMatrixD m_stackedCov
 The compressed band diagonal matrix for the KF2 implementation.
 
bool m_hasToRecoverMeanAndCov
 Only for the KF2 implementation.
 
std::vector< TRandomFieldCellm_map
 The cells.
 
float m_x_min
 
float m_x_max
 
float m_y_min
 
float m_y_max
 
float m_resolution
 
size_t m_size_x
 
size_t m_size_y
 
Auxiliary vars for DM & DM+V methods
float m_DM_lastCutOff
 
std::vector< float > m_DM_gaussWindow
 
double m_average_normreadings_mean
 
double m_average_normreadings_var
 
size_t m_average_normreadings_count
 

RTTI stuff

typedef CWirelessPowerGridMap2DPtr SmartPtr
 
static mrpt::utils::CLASSINIT _init_CWirelessPowerGridMap2D
 
static mrpt::utils::TRuntimeClassId classCWirelessPowerGridMap2D
 
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::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
 
static mrpt::utils::CObjectCreateObject ()
 
static CWirelessPowerGridMap2DPtr Create ()
 

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 67 of file CWirelessPowerGridMap2D.h.

Member Enumeration Documentation

The type of map representation to be used.

Enumerator
mrKernelDM 
mrAchim 
mrKalmanFilter 
mrKalmanApproximate 
mrKernelDMV 

Definition at line 138 of file CRandomFieldGridMap2D.h.

Constructor & Destructor Documentation

mrpt::slam::CWirelessPowerGridMap2D::CWirelessPowerGridMap2D ( TMapRepresentation  mapType = mrAchim,
float  x_min = -2,
float  x_max = 2,
float  y_min = -2,
float  y_max = 2,
float  resolution = 0.1 
)

Constructor.

virtual mrpt::slam::CWirelessPowerGridMap2D::~CWirelessPowerGridMap2D ( )
virtual

Destructor.

Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CWirelessPowerGridMap2D::_GetBaseClass ( )
staticprotected
virtual void mrpt::slam::CMetricMap::auxParticleFilterCleanUp ( )
inlinevirtualinherited

This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation".

This method should normally do nothing, but in some cases can be used to free auxiliary cached variables.

Reimplemented in mrpt::slam::CLandmarksMap, and mrpt::slam::CMultiMetricMap.

Definition at line 326 of file CMetricMap.h.

virtual bool mrpt::slam::CMetricMap::canComputeObservationLikelihood ( const CObservation obs)
inlinevirtualinherited

Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.

an occupancy grid map cannot with an image).

Parameters
obsThe observation.
See Also
computeObservationLikelihood

Reimplemented in mrpt::slam::COccupancyGridMap2D, and mrpt::slam::CMultiMetricMap.

Definition at line 184 of file CMetricMap.h.

bool mrpt::slam::CMetricMap::canComputeObservationsLikelihood ( const CSensoryFrame sf)
inherited

Returns true if this map is able to compute a sensible likelihood function for this observation (i.e.

an occupancy grid map cannot with an image).

Parameters
sfThe observations.
See Also
canComputeObservationLikelihood
float mrpt::slam::CRandomFieldGridMap2D::cell2float ( const TRandomFieldCell c) const
inlineinherited

Definition at line 131 of file CRandomFieldGridMap2D.h.

References mrpt::slam::TRandomFieldCell::kf_mean.

virtual float mrpt::utils::CDynamicGrid< TRandomFieldCell >::cell2float ( const TRandomFieldCell c) const
inlinevirtualinherited

The user must implement this in order to provide "saveToTextFile" a way to convert each cell into a numeric value.

Definition at line 281 of file CDynamicGrid.h.

TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByIndex ( unsigned int  cx,
unsigned int  cy 
)
inlineinherited

Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.

Definition at line 236 of file CDynamicGrid.h.

const TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByIndex ( unsigned int  cx,
unsigned int  cy 
) const
inlineinherited

Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the map extensions.

Definition at line 245 of file CDynamicGrid.h.

TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByPos ( float  x,
float  y 
)
inlineinherited

Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.

Definition at line 210 of file CDynamicGrid.h.

const TRandomFieldCell * mrpt::utils::CDynamicGrid< TRandomFieldCell >::cellByPos ( float  x,
float  y 
) const
inlineinherited

Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map extensions.

Definition at line 223 of file CDynamicGrid.h.

void mrpt::slam::CRandomFieldGridMap2D::clear ( void  )
inlineinherited

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

Definition at line 128 of file CRandomFieldGridMap2D.h.

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

CObject* mrpt::utils::CObject::clone ( ) const
inlineinherited

Cloning interface for smart pointers.

Definition at line 154 of file CObject.h.

float mrpt::slam::CRandomFieldGridMap2D::compute3DMatchingRatio ( const CMetricMap otherMap,
const CPose3D otherMapPose,
float  minDistForCorr = 0.10f,
float  minMahaDistForCorr = 2.0f 
) const
virtualinherited

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.

virtual void mrpt::slam::CMetricMap::computeMatchingWith2D ( const CMetricMap otherMap,
const CPose2D otherMapPose,
float  maxDistForCorrespondence,
float  maxAngularDistForCorrespondence,
const CPose2D angularDistPivotPoint,
TMatchingPairList correspondences,
float &  correspondencesRatio,
float *  sumSqrDist = NULL,
bool  onlyKeepTheClosest = true,
bool  onlyUniqueRobust = false,
const size_t  decimation_other_map_points = 1,
const size_t  offset_other_map_points = 0 
) const
inlinevirtualinherited

Computes the matchings between this and another 2D points map.

This includes finding:

  • The set of points pairs in each map
  • The mean squared distance between corresponding pairs. This method is the most time critical one into the ICP algorithm.
Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
maxDistForCorrespondence[IN] Maximum 2D linear distance between two points to be matched.
maxAngularDistForCorrespondence[IN] In radians: The aim is to allow larger distances to more distant correspondences.
angularDistPivotPoint[IN] The point used to calculate distances from in both maps.
correspondences[OUT] The detected matchings pairs.
correspondencesRatio[OUT] The ratio [0,1] of points in otherMap with at least one correspondence.
sumSqrDist[OUT] The sum of all matched points squared distances.If undesired, set to NULL, as default.
onlyKeepTheClosest[IN] If set to true, only the closest correspondence will be returned. If false (default) all are returned.
See Also
compute3DMatchingRatio

Reimplemented in mrpt::slam::COccupancyGridMap2D, mrpt::slam::CPointsMap, mrpt::slam::CBeaconMap, and mrpt::slam::CMultiMetricMap.

Definition at line 236 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

virtual void mrpt::slam::CMetricMap::computeMatchingWith3D ( const CMetricMap otherMap,
const CPose3D otherMapPose,
float  maxDistForCorrespondence,
float  maxAngularDistForCorrespondence,
const CPoint3D angularDistPivotPoint,
TMatchingPairList correspondences,
float &  correspondencesRatio,
float *  sumSqrDist = NULL,
bool  onlyKeepTheClosest = true,
bool  onlyUniqueRobust = false,
const size_t  decimation_other_map_points = 1,
const size_t  offset_other_map_points = 0 
) const
inlinevirtualinherited

Computes the matchings between this and another 3D points map - method used in 3D-ICP.

This method finds the set of point pairs in each map.

The method is the most time critical one into the ICP algorithm.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
maxDistForCorrespondence[IN] Maximum 2D linear distance between two points to be matched.
maxAngularDistForCorrespondence[IN] In radians: The aim is to allow larger distances to more distant correspondences.
angularDistPivotPoint[IN] The point used to calculate distances from in both maps.
correspondences[OUT] The detected matchings pairs.
correspondencesRatio[OUT] The ratio [0,1] of points in otherMap with at least one correspondence.
sumSqrDist[OUT] The sum of all matched points squared distances.If undesired, set to NULL, as default.
onlyKeepTheClosest[IN] If set to true, only the closest correspondence will be returned. If false (default) all are returned.
See Also
compute3DMatchingRatio

Reimplemented in mrpt::slam::CPointsMap.

Definition at line 272 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

double mrpt::slam::CRandomFieldGridMap2D::computeMeanCellValue_DM_DMV ( const TRandomFieldCell cell) const
protectedinherited

Computes the average cell concentration, or the overall average value if it has never been observed.

double mrpt::slam::CWirelessPowerGridMap2D::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.

double mrpt::slam::CMetricMap::computeObservationLikelihood ( const CObservation obs,
const CPose2D takenFrom 
)
inlineinherited

Computes the log-likelihood of a given observation given an arbitrary robot 2D pose.

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
obsThe observation.
Returns
This method returns a log-likelihood.
See Also
Used in particle filter algorithms, see: CMultiMetricMapPDF::update

Definition at line 175 of file CMetricMap.h.

double mrpt::slam::CMetricMap::computeObservationsLikelihood ( const CSensoryFrame sf,
const CPose2D takenFrom 
)
inherited

Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame.

Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
sfThe set of observations in a CSensoryFrame.
Returns
This method returns a log-likelihood.
See Also
canComputeObservationsLikelihood
double mrpt::slam::CRandomFieldGridMap2D::computeVarCellValue_DM_DMV ( const TRandomFieldCell cell) const
protectedinherited

Computes the estimated variance of the cell concentration, or the overall average variance if it has never been observed.

static CWirelessPowerGridMap2DPtr mrpt::slam::CWirelessPowerGridMap2D::Create ( )
static
static mrpt::utils::CObject* mrpt::slam::CWirelessPowerGridMap2D::CreateObject ( )
static
virtual mrpt::utils::CObject* mrpt::slam::CWirelessPowerGridMap2D::duplicate ( ) const
virtual

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

Implements mrpt::utils::CObject.

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const
inlineinherited

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 151 of file CObject.h.

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::fill ( const TRandomFieldCell value)
inlineinherited

Fills all the cells with the same value.

Definition at line 116 of file CDynamicGrid.h.

References fill().

void mrpt::slam::CWirelessPowerGridMap2D::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr outObj) const
virtual

Returns a 3D object representing the map.

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

virtual void mrpt::slam::CRandomFieldGridMap2D::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr meanObj,
mrpt::opengl::CSetOfObjectsPtr varObj 
) const
virtualinherited

Returns two 3D objects representing the mean and variance maps.

Reimplemented in mrpt::slam::CGasConcentrationGridMap2D.

virtual void mrpt::slam::CWirelessPowerGridMap2D::getAsBitmapFile ( mrpt::utils::CImage out_img) const
virtual

Returns an image just as described in saveAsBitmapFile.

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

void mrpt::slam::CRandomFieldGridMap2D::getAsMatlab3DGraphScript ( std::string &  out_script) const
inherited

Return a large text block with a MATLAB script to plot the contents of this map.

See Also
saveAsMatlab3DGraph This method can only be called in a KF map model.
void mrpt::utils::CDynamicGrid< TRandomFieldCell >::getAsMatrix ( MAT &  m) const
inlineinherited

Get the entire grid as a matrix.

Template Parameters
MATThe type of the matrix, typically a CMatrixDouble.
Parameters
[out]mThe output matrix; will be set automatically to the correct size. Entry (cy,cx) in the matrix contains the grid cell with indices (cx,cy).
Note
This method will compile only for cell types that can be converted to the type of the matrix elements (e.g. double).

Definition at line 329 of file CDynamicGrid.h.

virtual const CSimplePointsMap* mrpt::slam::CMetricMap::getAsSimplePointsMap ( ) const
inlinevirtualinherited

If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it.

Otherwise, return NULL

Reimplemented in mrpt::slam::CPointsMap, mrpt::slam::CMultiMetricMap, and mrpt::slam::CSimplePointsMap.

Definition at line 346 of file CMetricMap.h.

virtual CSimplePointsMap* mrpt::slam::CMetricMap::getAsSimplePointsMap ( )
inlinevirtualinherited
virtual CRandomFieldGridMap2D::TInsertionOptionsCommon* mrpt::slam::CWirelessPowerGridMap2D::getCommonInsertOptions ( )
inlineprotectedvirtual

Get the part of the options common to all CRandomFieldGridMap2D classes.

Implements mrpt::slam::CRandomFieldGridMap2D.

Definition at line 132 of file CWirelessPowerGridMap2D.h.

TMapRepresentation mrpt::slam::CRandomFieldGridMap2D::getMapType ( )
inherited

Return the type of the random-field grid map, according to parameters passed on construction.

void mrpt::slam::CRandomFieldGridMap2D::getMeanAndCov ( vector_double out_means,
CMatrixDouble out_cov 
) const
inherited

Return the mean and covariance vector of the full Kalman filter estimate (works for all KF-based methods).

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getResolution ( ) const
inlineinherited

Returns the resolution of the grid map.

Definition at line 278 of file CDynamicGrid.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CWirelessPowerGridMap2D::GetRuntimeClass ( ) const
virtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::getSizeX ( ) const
inlineinherited

Returns the horizontal size of grid map in cells count.

Definition at line 254 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::getSizeY ( ) const
inlineinherited

Returns the vertical size of grid map in cells count.

Definition at line 258 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getXMax ( ) const
inlineinherited

Returns the "x" coordinate of right side of grid map.

Definition at line 266 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getXMin ( ) const
inlineinherited

Returns the "x" coordinate of left side of grid map.

Definition at line 262 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getYMax ( ) const
inlineinherited

Returns the "y" coordinate of bottom side of grid map.

Definition at line 274 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::getYMin ( ) const
inlineinherited

Returns the "y" coordinate of top side of grid map.

Definition at line 270 of file CDynamicGrid.h.

bool mrpt::utils::CObservable::hasSubscribers ( ) const
inlineprotectedinherited

Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.

Definition at line 69 of file CObservable.h.

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2cxcy ( const int &  idx,
int &  cx,
int &  cy 
) const
inlineinherited

Transform a global (linear) cell index value into its corresponding (x,y) cell indexes.

Definition at line 306 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2x ( int  cx) const
inlineinherited

Transform a cell index into a coordinate value.

Definition at line 314 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::idx2y ( int  cy) const
inlineinherited

Definition at line 315 of file CDynamicGrid.h.

bool mrpt::slam::CMetricMap::insertObservation ( const CObservation obs,
const CPose3D robotPose = NULL 
)
inlineinherited

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 the origin.
See Also
CObservation::insertObservationInto

Definition at line 133 of file CMetricMap.h.

void mrpt::slam::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV ( float  normReading,
const CPose3D sensorPose,
bool  is_DMV 
)
protectedinherited

The implementation of "insertObservation" for Achim Lilienthal's map models DM & DM+V.

Parameters
normReadingIs a [0,1] normalized concentration reading.
sensorPoseIs the sensor pose on the robot
is_DMV= false -> map type is Kernel DM; true -> map type is DM+V
void mrpt::slam::CRandomFieldGridMap2D::insertObservation_KF ( float  normReading,
const CPose3D sensorPose 
)
protectedinherited

The implementation of "insertObservation" for the (whole) Kalman Filter map model.

Parameters
normReadingIs a [0,1] normalized concentration reading.
sensorPoseIs the sensor pose
void mrpt::slam::CRandomFieldGridMap2D::insertObservation_KF2 ( float  normReading,
const CPose3D sensorPose 
)
protectedinherited

The implementation of "insertObservation" for the Efficient Kalman Filter map model.

Parameters
normReadingIs a [0,1] normalized concentration reading.
sensorPoseIs the sensor pose
bool mrpt::slam::CMetricMap::insertObservationPtr ( const CObservationPtr obs,
const CPose3D robotPose = NULL 
)
inlineinherited

A wrapper for smart pointers, just calls the non-smart pointer version.

Definition at line 147 of file CMetricMap.h.

References MRPT_END, MRPT_START, mrpt::slam::CObservationPtr::pointer(), mrpt::stlplus::smart_ptr_base< T, C, COUNTER >::present(), and THROW_EXCEPTION.

virtual void mrpt::slam::CWirelessPowerGridMap2D::internal_clear ( )
protectedvirtual

Erase all the contents of the map.

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

virtual bool mrpt::slam::CWirelessPowerGridMap2D::internal_insertObservation ( const CObservation obs,
const CPose3D robotPose = NULL 
)
protectedvirtual

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.

virtual bool mrpt::slam::CRandomFieldGridMap2D::isEmpty ( ) const
virtualinherited

Returns true if the map is empty/no observation has been inserted (in this class it always return false, unless redefined otherwise in base classes)

Implements mrpt::slam::CMetricMap.

void mrpt::slam::CMetricMap::loadFromProbabilisticPosesAndObservations ( const CSimpleMap Map)
inherited

Load the map contents from a CSimpleMap object, erasing all previous content of the map.

This is automaticed invoking "insertObservation" for each observation at the mean 3D robot pose as given by the "poses::CPosePDF" in the CSimpleMap object.

See Also
insertObservation, CSimpleMap
Exceptions
std::exceptionSome internal steps in invoked methods can raise exceptions on invalid parameters, etc...
void mrpt::slam::CMetricMap::loadFromSimpleMap ( const CSimpleMap Map)
inlineinherited

Load the map contents from a CSimpleMap object, erasing all previous content of the map.

This is automaticed invoking "insertObservation" for each observation at the mean 3D robot pose as given by the "poses::CPosePDF" in the CSimpleMap object.

See Also
insertObservation, CSimpleMap
Exceptions
std::exceptionSome internal steps in invoked methods can raise exceptions on invalid parameters, etc...

Definition at line 124 of file CMetricMap.h.

std::vector<TRandomFieldCell >& mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_map_castaway_const ( ) const
inlineprotectedinherited

Used only from logically const method that really need to modify the object.

Definition at line 52 of file CDynamicGrid.h.

virtual void mrpt::slam::CRandomFieldGridMap2D::predictMeasurement ( const double &  x,
const double &  y,
double &  out_predict_response,
double &  out_predict_response_variance 
)
virtualinherited

Returns the prediction of the measurement at some (x,y) coordinates, and its certainty (in the form of the expected variance).

This methods is implemented differently for the different gas map types.

void mrpt::utils::CObservable::publishEvent ( const mrptEvent e) const
protectedinherited

Called when you want this object to emit an event to all the observers currently subscribed to this object.

void mrpt::slam::CWirelessPowerGridMap2D::readFromStream ( mrpt::utils::CStream in,
int  version 
)
protectedvirtual

Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.

Parameters
inThe input binary stream where the object data must read from.
versionThe version of the object stored in the stream: use this version number in your code to know how to read the incoming data.
Exceptions
std::exceptionOn any error, see CStream::ReadBuffer
See Also
CStream

Implements mrpt::utils::CSerializable.

void mrpt::slam::CRandomFieldGridMap2D::recoverMeanAndCov ( ) const
protectedinherited

In the KF2 implementation, takes the auxiliary matrices and from them update the cells' mean and std values.

See Also
m_hasToRecoverMeanAndCov
virtual void mrpt::utils::CDynamicGrid< TRandomFieldCell >::resize ( float  new_x_min,
float  new_x_max,
float  new_y_min,
float  new_y_max,
const TRandomFieldCell defaultValueNewCells,
float  additionalMarginMeters = 2.0f 
)
inlinevirtualinherited

Changes the size of the grid, maintaining previous contents.

See Also
setSize

Definition at line 121 of file CDynamicGrid.h.

References MRPT_CHECK_NORMAL_NUMBER, MRPT_END, MRPT_START, and mrpt::utils::round().

virtual void mrpt::slam::CRandomFieldGridMap2D::resize ( float  new_x_min,
float  new_x_max,
float  new_y_min,
float  new_y_max,
const TRandomFieldCell defaultValueNewCells,
float  additionalMarginMeters = 1.0f 
)
virtualinherited

Changes the size of the grid, maintaining previous contents.

See Also
setSize
virtual void mrpt::slam::CRandomFieldGridMap2D::saveAsBitmapFile ( const std::string &  filName) const
virtualinherited

Save the current map as a graphical file (BMP,PNG,...).

The file format will be derived from the file extension (see CImage::saveToFile ) It depends on the map representation model: mrAchim: Each pixel is the ratio $ \sum{\frac{wR}{w}} $ mrKalmanFilter: Each pixel is the mean value of the Gaussian that represents each cell.

See Also
getAsBitmapFile()
void mrpt::slam::CWirelessPowerGridMap2D::saveAsMatlab3DGraph ( const std::string &  filName) const
virtual

Save a matlab ".m" file which represents as 3D surfaces the mean and a given confidence level for the concentration of each cell.

This method can only be called in a KF map model.

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

void mrpt::slam::CWirelessPowerGridMap2D::saveMetricMapRepresentationToFile ( const std::string &  filNamePrefix) const
virtual

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

Reimplemented from mrpt::slam::CRandomFieldGridMap2D.

void mrpt::utils::CDynamicGrid< TRandomFieldCell >::saveToTextFile ( const std::string &  fileName) const
inlineinherited
void mrpt::utils::CDynamicGrid< TRandomFieldCell >::setSize ( float  x_min,
float  x_max,
float  y_min,
float  y_max,
float  resolution 
)
inlineinherited

Changes the size of the grid, ERASING all previous contents.

See Also
resize

Definition at line 83 of file CDynamicGrid.h.

References mrpt::utils::round().

virtual float mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence ( const float &  x0,
const float &  y0 
) const
inlinevirtualinherited

Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.

Definition at line 333 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

void mrpt::slam::CWirelessPowerGridMap2D::writeToStream ( mrpt::utils::CStream out,
int *  getVersion 
) const
protectedvirtual

Introduces a pure virtual method responsible for writing to a CStream.

This can not be used directly be users, instead use "stream << object;" for writing it to a stream.

Parameters
outThe output binary stream where object must be dumped.
getVersionIf NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data.
Exceptions
std::exceptionOn any error, see CStream::WriteBuffer
See Also
CStream

Implements mrpt::utils::CSerializable.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::x2idx ( float  x) const
inlineinherited

Transform a coordinate values into cell indexes.

Definition at line 301 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::x2idx ( float  x,
float  x_min 
) const
inlineinherited

Transform a coordinate value into a cell index, using a diferent "x_min" value.

Definition at line 319 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::xy2idx ( float  x,
float  y 
) const
inlineinherited

Definition at line 303 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::y2idx ( float  y) const
inlineinherited

Definition at line 302 of file CDynamicGrid.h.

int mrpt::utils::CDynamicGrid< TRandomFieldCell >::y2idx ( float  y,
float  y_min 
) const
inlineinherited

Definition at line 320 of file CDynamicGrid.h.

Member Data Documentation

mrpt::utils::CLASSINIT mrpt::slam::CWirelessPowerGridMap2D::_init_CWirelessPowerGridMap2D
staticprotected

Definition at line 67 of file CWirelessPowerGridMap2D.h.

const mrpt::utils::TRuntimeClassId mrpt::slam::CMetricMap::classCMetricMap
staticinherited

Definition at line 81 of file CMetricMap.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject
staticinherited

Definition at line 139 of file CObject.h.

const mrpt::utils::TRuntimeClassId mrpt::slam::CRandomFieldGridMap2D::classCRandomFieldGridMap2D
staticinherited

Definition at line 122 of file CRandomFieldGridMap2D.h.

const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable
staticinherited

Definition at line 56 of file CSerializable.h.

mrpt::utils::TRuntimeClassId mrpt::slam::CWirelessPowerGridMap2D::classCWirelessPowerGridMap2D
static

Definition at line 67 of file CWirelessPowerGridMap2D.h.

const mrpt::utils::TRuntimeClassId* mrpt::slam::CWirelessPowerGridMap2D::classinfo
static

Definition at line 67 of file CWirelessPowerGridMap2D.h.

mrpt::slam::CWirelessPowerGridMap2D::TInsertionOptions mrpt::slam::CWirelessPowerGridMap2D::insertionOptions
size_t mrpt::slam::CRandomFieldGridMap2D::m_average_normreadings_count
protectedinherited

Definition at line 307 of file CRandomFieldGridMap2D.h.

double mrpt::slam::CRandomFieldGridMap2D::m_average_normreadings_mean
protectedinherited

Definition at line 306 of file CRandomFieldGridMap2D.h.

double mrpt::slam::CRandomFieldGridMap2D::m_average_normreadings_var
protectedinherited

Definition at line 306 of file CRandomFieldGridMap2D.h.

CMatrixD mrpt::slam::CRandomFieldGridMap2D::m_cov
protectedinherited

The whole covariance matrix, used for the Kalman Filter map representation.

Definition at line 293 of file CRandomFieldGridMap2D.h.

bool mrpt::slam::CMetricMap::m_disableSaveAs3DObject
inherited

When set to true (default=false), calling "getAs3DObject" will have no effects.

Definition at line 321 of file CMetricMap.h.

std::vector<float> mrpt::slam::CRandomFieldGridMap2D::m_DM_gaussWindow
protectedinherited

Definition at line 305 of file CRandomFieldGridMap2D.h.

float mrpt::slam::CRandomFieldGridMap2D::m_DM_lastCutOff
protectedinherited

Definition at line 304 of file CRandomFieldGridMap2D.h.

bool mrpt::slam::CRandomFieldGridMap2D::m_hasToRecoverMeanAndCov
mutableprotectedinherited

Only for the KF2 implementation.

Definition at line 300 of file CRandomFieldGridMap2D.h.

TInsertionOptionsCommon* mrpt::slam::CRandomFieldGridMap2D::m_insertOptions_common
protectedinherited

Common options to all random-field grid maps: pointer that is set to the derived-class instance of "insertOptions" upon construction of this class.

Definition at line 285 of file CRandomFieldGridMap2D.h.

std::vector<TRandomFieldCell > mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_map
protectedinherited

The cells.

Definition at line 49 of file CDynamicGrid.h.

TMapRepresentation mrpt::slam::CRandomFieldGridMap2D::m_mapType
protectedinherited

The map representation type of this map, as passed in the constructor.

Definition at line 291 of file CRandomFieldGridMap2D.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_resolution
protectedinherited

Definition at line 55 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_size_x
protectedinherited

Definition at line 56 of file CDynamicGrid.h.

size_t mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_size_y
protectedinherited

Definition at line 56 of file CDynamicGrid.h.

CMatrixD mrpt::slam::CRandomFieldGridMap2D::m_stackedCov
protectedinherited

The compressed band diagonal matrix for the KF2 implementation.

The format is a Nx(W^2+2W+1) matrix, one row per cell in the grid map with the cross-covariances between each cell and half of the window around it in the grid.

Definition at line 299 of file CRandomFieldGridMap2D.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_x_max
protectedinherited

Definition at line 54 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_x_min
protectedinherited

Definition at line 54 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_y_max
protectedinherited

Definition at line 54 of file CDynamicGrid.h.

float mrpt::utils::CDynamicGrid< TRandomFieldCell >::m_y_min
protectedinherited

Definition at line 54 of file CDynamicGrid.h.




Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013