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
mrpt::slam::CMultiMetricMap Class Reference

Detailed Description

This class stores any customizable set of metric maps.

The internal metric maps can be accessed directly by the user as smart pointers. The intended utility of this container is to operate on several maps simultaneously: update them by inserting observations, evaluate the likelihood of one observation by fusing (multiplying) the likelihoods over the different maps, etc.

All these kinds of metric maps can be kept in a multi-metric map::

See CMultiMetricMap::setListOfMaps() for the method for initializing this class programatically. See also TSetOfMetricMapInitializers::loadFromConfigFile for a template of ".ini"-like configuration file that can be used to define which maps to create and all their parameters.

See also
CMetricMap

Definition at line 64 of file CMultiMetricMap.h.

#include <mrpt/slam/CMultiMetricMap.h>

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

Classes

struct  TOptions
 Some options for this class: More...
 

Public Types

typedef std::pair< CPoint3D, unsigned int > TPairIdBeacon
 

Public Member Functions

bool isEmpty () const
 Returns true if the map is empty/no observation has been inserted. More...
 
 CMultiMetricMap (const mrpt::slam::TSetOfMetricMapInitializers *initializers=NULL, const TOptions *opts=NULL)
 Constructor. More...
 
void setListOfMaps (const mrpt::slam::TSetOfMetricMapInitializers *initializers)
 Sets the list of internal map according to the passed list of map initializers (Current maps' content will be deleted!) More...
 
 CMultiMetricMap (const mrpt::slam::CMultiMetricMap &other)
 Copy constructor. More...
 
mrpt::slam::CMultiMetricMapoperator= (const mrpt::slam::CMultiMetricMap &other)
 Copy operator from "other" object. More...
 
virtual ~CMultiMetricMap ()
 Destructor. More...
 
double computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More...
 
float getNewStaticPointsRatio (CPointsMap *points, CPose2D &takenFrom)
 Returns the ratio of points in a map which are new to the point map while falling into yet static cells of gridmap. More...
 
virtual void determineMatching2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const
 Computes the matching between this and another 2D point map, which includes finding: More...
 
float compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float maxDistForCorr=0.10f, float maxMahaDistForCorr=2.0f) const
 See the definition in the base class: Calls in this class become a call to every single map in this set. More...
 
void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const
 The implementation in this class just calls all the corresponding method of the contained metric maps. More...
 
void auxParticleFilterCleanUp ()
 This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". More...
 
void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const
 Returns a 3D object representing the map. More...
 
bool canComputeObservationLikelihood (const CObservation *obs)
 Returns true if any of the inner maps is able to compute a sensible likelihood function for this observation. More...
 
virtual const CSimplePointsMapgetAsSimplePointsMap () const
 If the map is a simple point map or it's a multi-metric map that contains EXACTLY one simple point map, return it. More...
 
virtual CSimplePointsMapgetAsSimplePointsMap ()
 
void clear ()
 Erase all the contents of the map. More...
 
void loadFromProbabilisticPosesAndObservations (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
void loadFromSimpleMap (const CSimpleMap &Map)
 Load the map contents from a CSimpleMap object, erasing all previous content of the map. More...
 
bool insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)
 Insert the observation information into this map. More...
 
bool insertObservationPtr (const CObservationPtr &obs, const CPose3D *robotPose=NULL)
 A wrapper for smart pointers, just calls the non-smart pointer version. More...
 
double computeObservationLikelihood (const CObservation *obs, const CPose2D &takenFrom)
 Computes the log-likelihood of a given observation given an arbitrary robot 2D pose. More...
 
bool canComputeObservationLikelihood (const CObservationPtr &obs)
 
double computeObservationsLikelihood (const CSensoryFrame &sf, const CPose2D &takenFrom)
 Returns the sum of the log-likelihoods of each individual observation within a mrpt::slam::CSensoryFrame. More...
 
bool canComputeObservationsLikelihood (const CSensoryFrame &sf)
 Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More...
 
virtual void determineMatching3D (const CMetricMap *otherMap, const CPose3D &otherMapPose, TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const
 Computes the matchings between this and another 3D points map - method used in 3D-ICP. More...
 
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 MRPT_DEPRECATED_POST("Deprecated")
 DEPRECATED: Use alternative version determineMatching2D with struct parameters instead. More...
 
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 MRPT_DEPRECATED_POST("Deprecated")
 DEPRECATED: Use alternative version determineMatching3D with struct parameters instead. More...
 
virtual float squareDistanceToClosestCorrespondence (float x0, float y0) const
 Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map. More...
 
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). More...
 
CObjectclone () const
 Cloning interface for smart pointers. More...
 

Public Attributes

mrpt::slam::CMultiMetricMap::TOptions options
 
unsigned int m_ID
 An auxiliary variable that can be used freely by the users (this will be copied to other maps using the copy constructor, copy operator, streaming,etc) The default value is 0. More...
 
bool m_disableSaveAs3DObject
 When set to true (default=false), calling "getAs3DObject" will have no effects. More...
 
Internal lists of maps
std::deque< CSimplePointsMapPtrm_pointsMaps
 
std::deque< COccupancyGridMap2DPtrm_gridMaps
 
std::deque< COctoMapPtrm_octoMaps
 
std::deque< CColouredOctoMapPtrm_colourOctoMaps
 
std::deque< CGasConcentrationGridMap2DPtrm_gasGridMaps
 
std::deque< CWirelessPowerGridMap2DPtrm_wifiGridMaps
 
std::deque< CHeightGridMap2DPtrm_heightMaps
 
std::deque< CReflectivityGridMap2DPtrm_reflectivityMaps
 
CColouredPointsMapPtr m_colourPointsMap
 
CWeightedPointsMapPtr m_weightedPointsMap
 
CLandmarksMapPtr m_landmarksMap
 
CBeaconMapPtr m_beaconMap
 

Static Public Attributes

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

Protected Member Functions

void deleteAllMaps ()
 Deletes all maps and clears the internal lists of maps. More...
 
virtual void internal_clear ()
 Clear all elements of the map. More...
 
virtual bool internal_insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL)
 Insert the observation information into this map (see options) More...
 
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. More...
 
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. More...
 
CSerializable virtual methods
void writeToStream (mrpt::utils::CStream &out, int *getVersion) const
 Introduces a pure virtual method responsible for writing to a CStream. More...
 
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. More...
 

RTTI stuff

typedef CMultiMetricMapPtr SmartPtr
 
static mrpt::utils::CLASSINIT _init_CMultiMetricMap
 
static mrpt::utils::TRuntimeClassId classCMultiMetricMap
 
static const mrpt::utils::TRuntimeClassIdclassinfo
 
static const mrpt::utils::TRuntimeClassId_GetBaseClass ()
 
virtual const mrpt::utils::TRuntimeClassIdGetRuntimeClass () const
 Returns information about the class of an object in runtime. More...
 
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class. More...
 
static mrpt::utils::CObjectCreateObject ()
 
static CMultiMetricMapPtr Create ()
 

Member Typedef Documentation

◆ SmartPtr

A typedef for the associated smart pointer

Definition at line 67 of file CMultiMetricMap.h.

◆ TPairIdBeacon

typedef std::pair<CPoint3D,unsigned int> mrpt::slam::CMultiMetricMap::TPairIdBeacon

Definition at line 87 of file CMultiMetricMap.h.

Constructor & Destructor Documentation

◆ CMultiMetricMap() [1/2]

mrpt::slam::CMultiMetricMap::CMultiMetricMap ( const mrpt::slam::TSetOfMetricMapInitializers initializers = NULL,
const TOptions opts = NULL 
)

Constructor.

Parameters
initializersOne internal map will be created for each entry in this "TSetOfMetricMapInitializers" struct, and each map will be initialized with the corresponding options.
optsIf provided (not NULL), the member "options" will be initialized with those values. If initializers is NULL, no internal map will be created.

◆ CMultiMetricMap() [2/2]

mrpt::slam::CMultiMetricMap::CMultiMetricMap ( const mrpt::slam::CMultiMetricMap other)

Copy constructor.

◆ ~CMultiMetricMap()

virtual mrpt::slam::CMultiMetricMap::~CMultiMetricMap ( )
virtual

Destructor.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId* mrpt::slam::CMultiMetricMap::_GetBaseClass ( )
staticprotected

◆ auxParticleFilterCleanUp()

void mrpt::slam::CMultiMetricMap::auxParticleFilterCleanUp ( )
virtual

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 from mrpt::slam::CMetricMap.

◆ canComputeObservationLikelihood() [1/2]

bool mrpt::slam::CMetricMap::canComputeObservationLikelihood ( const CObservationPtr obs)
inlineinherited

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 204 of file CMetricMap.h.

References mrpt::slam::CMetricMap::canComputeObservationLikelihood(), and mrpt::slam::CObservationPtr::pointer().

Referenced by mrpt::slam::CMetricMap::canComputeObservationLikelihood().

◆ canComputeObservationLikelihood() [2/2]

bool mrpt::slam::CMultiMetricMap::canComputeObservationLikelihood ( const CObservation obs)
virtual

Returns true if any of the inner maps is able to compute a sensible likelihood function for this observation.

Parameters
obsThe observation.
See also
computeObservationLikelihood

Reimplemented from mrpt::slam::CMetricMap.

◆ canComputeObservationsLikelihood()

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

◆ clear()

void mrpt::slam::CMetricMap::clear ( )
inherited

◆ clone()

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

Cloning interface for smart pointers.

Definition at line 135 of file CObject.h.

◆ compute3DMatchingRatio()

float mrpt::slam::CMultiMetricMap::compute3DMatchingRatio ( const CMetricMap otherMap,
const CPose3D otherMapPose,
float  maxDistForCorr = 0.10f,
float  maxMahaDistForCorr = 2.0f 
) const
virtual

See the definition in the base class: Calls in this class become a call to every single map in this set.

Reimplemented from mrpt::slam::CMetricMap.

◆ computeMatchingWith2D()

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
inherited

DEPRECATED: Use alternative version determineMatching2D with struct parameters instead.

◆ computeMatchingWith3D()

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
inherited

DEPRECATED: Use alternative version determineMatching3D with struct parameters instead.

◆ computeObservationLikelihood() [1/2]

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 189 of file CMetricMap.h.

◆ computeObservationLikelihood() [2/2]

double mrpt::slam::CMultiMetricMap::computeObservationLikelihood ( const CObservation obs,
const CPose3D takenFrom 
)
virtual

Computes the log-likelihood of a given observation given an arbitrary robot 3D 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

Implements mrpt::slam::CMetricMap.

◆ computeObservationsLikelihood()

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

◆ Create()

static CMultiMetricMapPtr mrpt::slam::CMultiMetricMap::Create ( )
static

◆ CreateObject()

static mrpt::utils::CObject* mrpt::slam::CMultiMetricMap::CreateObject ( )
static

◆ deleteAllMaps()

void mrpt::slam::CMultiMetricMap::deleteAllMaps ( )
protected

Deletes all maps and clears the internal lists of maps.

◆ determineMatching2D()

virtual void mrpt::slam::CMultiMetricMap::determineMatching2D ( const CMetricMap otherMap,
const CPose2D otherMapPose,
TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
virtual

Computes the matching between this and another 2D point map, which includes finding:

  • The set of points pairs in each map
  • The mean squared distance between corresponding pairs.

The algorithm is:

  • For each point in "otherMap":
    • Transform the point according to otherMapPose
    • Search with a KD-TREE the closest correspondences in "this" map.
    • Add to the set of candidate matchings, if it passes all the thresholds in params.

This method is the most time critical one into ICP-like algorithms.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
params[IN] Parameters for the determination of pairings.
correspondences[OUT] The detected matchings pairs.
extraResults[OUT] Other results.
See also
compute3DMatchingRatio

Reimplemented from mrpt::slam::CMetricMap.

◆ determineMatching3D()

virtual void mrpt::slam::CMetricMap::determineMatching3D ( const CMetricMap otherMap,
const CPose3D otherMapPose,
TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) 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 ICP-like algorithms.

The algorithm is:

  • For each point in "otherMap":
    • Transform the point according to otherMapPose
    • Search with a KD-TREE the closest correspondences in "this" map.
    • Add to the set of candidate matchings, if it passes all the thresholds in params.
Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The pose of the other map as seen from "this".
params[IN] Parameters for the determination of pairings.
correspondences[OUT] The detected matchings pairs.
extraResults[OUT] Other results.
See also
compute3DMatchingRatio

Reimplemented in mrpt::slam::CPointsMap.

Definition at line 276 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

◆ duplicate()

virtual mrpt::utils::CObject* mrpt::slam::CMultiMetricMap::duplicate ( ) const
virtual

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

Implements mrpt::utils::CObject.

◆ duplicateGetSmartPtr()

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 132 of file CObject.h.

◆ getAs3DObject()

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

Returns a 3D object representing the map.

Implements mrpt::slam::CMetricMap.

◆ getAsSimplePointsMap() [1/2]

virtual const CSimplePointsMap* mrpt::slam::CMultiMetricMap::getAsSimplePointsMap ( ) const
virtual

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

Otherwise, return NULL

Reimplemented from mrpt::slam::CMetricMap.

◆ getAsSimplePointsMap() [2/2]

virtual CSimplePointsMap* mrpt::slam::CMultiMetricMap::getAsSimplePointsMap ( )
virtual

Reimplemented from mrpt::slam::CMetricMap.

◆ getNewStaticPointsRatio()

float mrpt::slam::CMultiMetricMap::getNewStaticPointsRatio ( CPointsMap points,
CPose2D takenFrom 
)

Returns the ratio of points in a map which are new to the point map while falling into yet static cells of gridmap.

Parameters
pointsThe set of points to check.
takenFromThe pose for the reference system of points, in global coordinates of this hybrid map.

◆ GetRuntimeClass()

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

Returns information about the class of an object in runtime.

Reimplemented from mrpt::slam::CMetricMap.

◆ hasSubscribers()

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 50 of file CObservable.h.

◆ insertObservation()

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 147 of file CMetricMap.h.

◆ insertObservationPtr()

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 161 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.

◆ internal_clear()

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

Clear all elements of the map.

Implements mrpt::slam::CMetricMap.

◆ internal_insertObservation()

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

Insert the observation information into this map (see options)

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.

◆ isEmpty()

bool mrpt::slam::CMultiMetricMap::isEmpty ( ) const
virtual

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

Implements mrpt::slam::CMetricMap.

◆ loadFromProbabilisticPosesAndObservations()

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...

◆ loadFromSimpleMap()

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 138 of file CMetricMap.h.

◆ operator=()

mrpt::slam::CMultiMetricMap& mrpt::slam::CMultiMetricMap::operator= ( const mrpt::slam::CMultiMetricMap other)

Copy operator from "other" object.

◆ publishEvent()

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.

◆ readFromStream()

void mrpt::slam::CMultiMetricMap::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.

◆ saveMetricMapRepresentationToFile()

void mrpt::slam::CMultiMetricMap::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.

◆ setListOfMaps()

void mrpt::slam::CMultiMetricMap::setListOfMaps ( const mrpt::slam::TSetOfMetricMapInitializers initializers)

Sets the list of internal map according to the passed list of map initializers (Current maps' content will be deleted!)

◆ squareDistanceToClosestCorrespondence()

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

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

Reimplemented in mrpt::slam::CPointsMap.

Definition at line 369 of file CMetricMap.h.

References MRPT_END, MRPT_START, and THROW_EXCEPTION.

◆ writeToStream()

void mrpt::slam::CMultiMetricMap::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.

Member Data Documentation

◆ _init_CMultiMetricMap

mrpt::utils::CLASSINIT mrpt::slam::CMultiMetricMap::_init_CMultiMetricMap
staticprotected

Definition at line 67 of file CMultiMetricMap.h.

◆ classCMetricMap

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

Definition at line 95 of file CMetricMap.h.

◆ classCMultiMetricMap

mrpt::utils::TRuntimeClassId mrpt::slam::CMultiMetricMap::classCMultiMetricMap
static

Definition at line 67 of file CMultiMetricMap.h.

◆ classCObject

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

Definition at line 120 of file CObject.h.

◆ classCSerializable

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

Definition at line 35 of file CSerializable.h.

◆ classinfo

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

Definition at line 67 of file CMultiMetricMap.h.

◆ m_beaconMap

CBeaconMapPtr mrpt::slam::CMultiMetricMap::m_beaconMap

Definition at line 162 of file CMultiMetricMap.h.

◆ m_colourOctoMaps

std::deque<CColouredOctoMapPtr> mrpt::slam::CMultiMetricMap::m_colourOctoMaps

Definition at line 154 of file CMultiMetricMap.h.

◆ m_colourPointsMap

CColouredPointsMapPtr mrpt::slam::CMultiMetricMap::m_colourPointsMap

Definition at line 159 of file CMultiMetricMap.h.

◆ m_disableSaveAs3DObject

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

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

Definition at line 357 of file CMetricMap.h.

◆ m_gasGridMaps

std::deque<CGasConcentrationGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_gasGridMaps

Definition at line 155 of file CMultiMetricMap.h.

◆ m_gridMaps

std::deque<COccupancyGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_gridMaps

Definition at line 152 of file CMultiMetricMap.h.

◆ m_heightMaps

std::deque<CHeightGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_heightMaps

Definition at line 157 of file CMultiMetricMap.h.

◆ m_ID

unsigned int mrpt::slam::CMultiMetricMap::m_ID

An auxiliary variable that can be used freely by the users (this will be copied to other maps using the copy constructor, copy operator, streaming,etc) The default value is 0.

Definition at line 247 of file CMultiMetricMap.h.

◆ m_landmarksMap

CLandmarksMapPtr mrpt::slam::CMultiMetricMap::m_landmarksMap

Definition at line 161 of file CMultiMetricMap.h.

◆ m_octoMaps

std::deque<COctoMapPtr> mrpt::slam::CMultiMetricMap::m_octoMaps

Definition at line 153 of file CMultiMetricMap.h.

◆ m_pointsMaps

std::deque<CSimplePointsMapPtr> mrpt::slam::CMultiMetricMap::m_pointsMaps

Definition at line 151 of file CMultiMetricMap.h.

◆ m_reflectivityMaps

std::deque<CReflectivityGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_reflectivityMaps

Definition at line 158 of file CMultiMetricMap.h.

◆ m_weightedPointsMap

CWeightedPointsMapPtr mrpt::slam::CMultiMetricMap::m_weightedPointsMap

Definition at line 160 of file CMultiMetricMap.h.

◆ m_wifiGridMaps

std::deque<CWirelessPowerGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_wifiGridMaps

Definition at line 156 of file CMultiMetricMap.h.

◆ options

mrpt::slam::CMultiMetricMap::TOptions mrpt::slam::CMultiMetricMap::options



Page generated by Doxygen 1.8.14 for MRPT 1.1.0 SVN: at lun oct 28 00:54:49 CET 2019 Hosted on:
SourceForge.net Logo