This class stores any customizable set of metric maps.
The internal metric maps can be accessed directly by the user as smart pointers with CMultiMetricMap::getMapByIndex() or via iterator
s. The 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.
These kinds of metric maps can be kept inside (list may be incomplete, refer to classes derived from mrpt::maps::CMetricMap):
octomap
).See CMultiMetricMap::setListOfMaps() for the method for initializing this class programmatically. 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. Alternatively, the list of maps is public so it can be directly manipulated/accessed in CMultiMetricMap::maps
Method #1: Using map definition structures
Method #2: Using a configuration file See TSetOfMetricMapInitializers::loadFromConfigFile() for details on expected file format.
Method #3: Manual manipulation
likelihoodMapSelection
, which selected the map to be used when computing the likelihood of an observation, has been removed. Use the enableObservationLikelihood
property of each individual map declaration.enableInsertion_{pointsMap,...}
have been also removed. Use the enableObservationInsertion
property of each map declaration.maps
member. Proxies named m_pointsMaps
,m_gridMaps
, etc. are provided for backwards-compatibility and for their utility.Definition at line 123 of file maps/CMultiMetricMap.h.
#include <mrpt/maps/CMultiMetricMap.h>
Classes | |
struct | ProxyFilterContainerByClass |
Takes a const ref of a STL non-associative container of smart pointers at construction and exposes an interface mildly similar to that of another STL container containing only those elements in the original container that can be dynamic_cast ed to SELECTED_CLASS_PTR More... | |
struct | ProxySelectorContainerByClass |
A proxy like ProxyFilterContainerByClass, but it directly appears as if it was a single smart pointer (empty if no matching object is found in the container) More... | |
Public Member Functions | |
void * | operator new (size_t size) |
void * | operator new[] (size_t size) |
void | operator delete (void *ptr) throw () |
void | operator delete[] (void *ptr) throw () |
void | operator delete (void *memory, void *ptr) throw () |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
void | operator delete (void *ptr, const std::nothrow_t &) throw () |
CMultiMetricMap (const mrpt::maps::TSetOfMetricMapInitializers *initializers=NULL) | |
Constructor. More... | |
CMultiMetricMap (const CMultiMetricMap &o) | |
CMultiMetricMap & | operator= (const CMultiMetricMap &o) |
void | setListOfMaps (const mrpt::maps::TSetOfMetricMapInitializers *initializers) |
Sets the list of internal map according to the passed list of map initializers (Current maps' content will be deleted!) More... | |
void | setListOfMaps (const mrpt::maps::TSetOfMetricMapInitializers &initializers) |
bool | isEmpty () const MRPT_OVERRIDE |
Returns true if all maps returns true to their isEmpty() method, which is map-dependent. Read the docs of each map class. More... | |
virtual void | determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const mrpt::maps::TMatchingParams ¶ms, mrpt::maps::TMatchingExtraResults &extraResults) const MRPT_OVERRIDE |
Computes the matching between this and another 2D point map, which includes finding: More... | |
float | compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams ¶ms) const MRPT_OVERRIDE |
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 MRPT_OVERRIDE |
The implementation in this class just calls all the corresponding method of the contained metric maps. More... | |
void | auxParticleFilterCleanUp () MRPT_OVERRIDE |
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 MRPT_OVERRIDE |
Returns a 3D object representing the map. More... | |
virtual const mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () const MRPT_OVERRIDE |
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 mrpt::maps::CSimplePointsMap * | getAsSimplePointsMap () MRPT_OVERRIDE |
void | clear () |
Erase all the contents of the map. More... | |
void | loadFromProbabilisticPosesAndObservations (const mrpt::maps::CSimpleMap &Map) |
Load the map contents from a CSimpleMap object, erasing all previous content of the map. More... | |
void | loadFromSimpleMap (const mrpt::maps::CSimpleMap &Map) |
Load the map contents from a CSimpleMap object, erasing all previous content of the map. More... | |
bool | insertObservation (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL) |
Insert the observation information into this map. More... | |
bool | insertObservationPtr (const mrpt::obs::CObservationPtr &obs, const mrpt::poses::CPose3D *robotPose=NULL) |
A wrapper for smart pointers, just calls the non-smart pointer version. More... | |
double | computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom) |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose. More... | |
double | computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose2D &takenFrom) |
virtual bool | canComputeObservationLikelihood (const mrpt::obs::CObservation *obs) const |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More... | |
bool | canComputeObservationLikelihood (const mrpt::obs::CObservationPtr &obs) const |
double | computeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf, const mrpt::poses::CPose2D &takenFrom) |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame. More... | |
bool | canComputeObservationsLikelihood (const mrpt::obs::CSensoryFrame &sf) const |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. More... | |
virtual void | determineMatching3D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams ¶ms, TMatchingExtraResults &extraResults) const |
Computes the matchings between this and another 3D points map - method used in 3D-ICP. 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... | |
virtual mxArray * | writeToMatlab () const |
Introduces a pure virtual method responsible for writing to a mxArray Matlab object, typically a MATLAB struct whose contents are documented in each derived class. More... | |
CObject * | clone () const |
Cloning interface for smart pointers. More... | |
RTTI classes and functions | |
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... | |
Static Public Member Functions | |
static void * | operator new (size_t size, void *ptr) |
Public Attributes | |
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... | |
TMapGenericParams | genericMapParams |
Common params to all maps. More... | |
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 (with clear_unique(), so user copies remain alive) More... | |
void | internal_clear () MRPT_OVERRIDE |
Clear all elements of the map. More... | |
bool | internal_insertObservation (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL) MRPT_OVERRIDE |
Internal method called by insertObservation() More... | |
bool | internal_canComputeObservationLikelihood (const mrpt::obs::CObservation *obs) const MRPT_OVERRIDE |
Returns true if any of the inner maps is able to compute a sensible likelihood function for this observation. More... | |
double | internal_computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom) MRPT_OVERRIDE |
Internal method called by computeObservationLikelihood() 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 | Ptr |
typedef CMultiMetricMapPtr | ConstPtr |
static mrpt::utils::CLASSINIT | _init_CMultiMetricMap |
static mrpt::utils::TRuntimeClassId | classCMultiMetricMap |
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. More... | |
virtual mrpt::utils::CObject * | duplicate () const |
Returns a copy of the object, indepently of its class. More... | |
static mrpt::utils::CObject * | CreateObject () |
static CMultiMetricMapPtr | Create () |
Access to internal list of maps: direct list, iterators, utility methods and proxies | |
typedef std::deque< mrpt::utils::poly_ptr_ptr< mrpt::maps::CMetricMapPtr > > | TListMaps |
typedef TListMaps::iterator | iterator |
typedef TListMaps::const_iterator | const_iterator |
TListMaps | maps |
The list of MRPT metric maps in this object. More... | |
ProxyFilterContainerByClass< mrpt::maps::CSimplePointsMapPtr, TListMaps > | m_pointsMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::COccupancyGridMap2DPtr, TListMaps > | m_gridMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::COctoMapPtr, TListMaps > | m_octoMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CColouredOctoMapPtr, TListMaps > | m_colourOctoMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CGasConcentrationGridMap2DPtr, TListMaps > | m_gasGridMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CWirelessPowerGridMap2DPtr, TListMaps > | m_wifiGridMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CHeightGridMap2DPtr, TListMaps > | m_heightMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CHeightGridMap2D_MRFPtr, TListMaps > | m_heightMRFMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxyFilterContainerByClass< mrpt::maps::CReflectivityGridMap2DPtr, TListMaps > | m_reflectivityMaps |
STL-like proxy to access this kind of maps in maps. More... | |
ProxySelectorContainerByClass< mrpt::maps::CColouredPointsMapPtr, TListMaps > | m_colourPointsMap |
Proxy that looks like a smart pointer to the first matching object in maps. More... | |
ProxySelectorContainerByClass< mrpt::maps::CWeightedPointsMapPtr, TListMaps > | m_weightedPointsMap |
Proxy that looks like a smart pointer to the first matching object in maps. More... | |
ProxySelectorContainerByClass< mrpt::maps::CLandmarksMapPtr, TListMaps > | m_landmarksMap |
Proxy that looks like a smart pointer to the first matching object in maps. More... | |
ProxySelectorContainerByClass< mrpt::maps::CBeaconMapPtr, TListMaps > | m_beaconMap |
Proxy that looks like a smart pointer to the first matching object in maps. More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
mrpt::maps::CMetricMapPtr | getMapByIndex (size_t idx) const |
Gets the i-th map. More... | |
template<typename T > | |
T::Ptr | getMapByClass (const size_t &ith=0) const |
Returns the i'th observation of a given class (or of a descendant class), or NULL if there is no such observation in the array. More... | |
typedef TListMaps::const_iterator mrpt::maps::CMultiMetricMap::const_iterator |
Definition at line 151 of file maps/CMultiMetricMap.h.
typedef CMultiMetricMapPtr mrpt::maps::CMultiMetricMap::ConstPtr |
Definition at line 126 of file maps/CMultiMetricMap.h.
typedef TListMaps::iterator mrpt::maps::CMultiMetricMap::iterator |
Definition at line 150 of file maps/CMultiMetricMap.h.
typedef CMultiMetricMapPtr mrpt::maps::CMultiMetricMap::Ptr |
A typedef for the associated smart pointer
Definition at line 126 of file maps/CMultiMetricMap.h.
typedef std::deque< mrpt::utils::poly_ptr_ptr<mrpt::maps::CMetricMapPtr> > mrpt::maps::CMultiMetricMap::TListMaps |
Definition at line 143 of file maps/CMultiMetricMap.h.
CMultiMetricMap::CMultiMetricMap | ( | const mrpt::maps::TSetOfMetricMapInitializers * | initializers = NULL | ) |
Constructor.
initializers | One internal map will be created for each entry in this "TSetOfMetricMapInitializers" struct. If initializers is NULL, no internal map will be created. |
Definition at line 182 of file CMultiMetricMap.cpp.
References MRPT_END, MRPT_START, and setListOfMaps().
CMultiMetricMap::CMultiMetricMap | ( | const CMultiMetricMap & | o | ) |
Definition at line 192 of file CMultiMetricMap.cpp.
|
staticprotected |
|
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::maps::CMetricMap.
Definition at line 440 of file CMultiMetricMap.cpp.
References MRPT_END, MRPT_START, and MapExecutor::run().
|
inline |
Definition at line 152 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 153 of file maps/CMultiMetricMap.h.
|
virtualinherited |
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). See: Maps and observations compatibility matrix
obs | The observation. |
Definition at line 189 of file CMetricMap.cpp.
|
inherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
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). See: Maps and observations compatibility matrix
sf | The observations. |
Definition at line 94 of file CMetricMap.cpp.
References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().
|
inherited |
Erase all the contents of the map.
Definition at line 34 of file CMetricMap.cpp.
Referenced by mrpt::maps::CGasConcentrationGridMap2D::CGasConcentrationGridMap2D(), mrpt::maps::CHeightGridMap2D_MRF::CHeightGridMap2D_MRF(), mrpt::maps::CReflectivityGridMap2D::clear(), mrpt::maps::CHeightGridMap2D::clear(), mrpt::maps::CRandomFieldGridMap2D::clear(), mrpt::maps::CWirelessPowerGridMap2D::CWirelessPowerGridMap2D(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::maps::CPointsMap::extractPoints(), mrpt::opengl::CAngularObservationMesh::generatePointCloud(), mrpt::maps::COccupancyGridMap2D::getAsPointCloud(), mrpt::maps::CPointsMap::load2Dor3D_from_text_file(), mrpt::maps::CLandmarksMap::loadOccupancyFeaturesFrom2DRangeScan(), mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape(), mrpt::hmtslam::CLSLAM_RBPF_2DLASER::prediction_and_update_pfOptimalProposal(), mrpt::vision::projectMatchedFeatures(), run_rnav_test(), mrpt::maps::CRandomFieldGridMap2D::setSize(), mrpt::nav::PlannerTPS_VirtualBase::transformPointcloudWithSquareClipping(), and mrpt::hmtslam::CLocalMetricHypothesis::updateAreaFromLMH().
|
inlineinherited |
|
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::maps::CMetricMap.
Definition at line 416 of file CMultiMetricMap.cpp.
References ASSERT_, mrpt::maps::CMetricMap::compute3DMatchingRatio(), maps, MRPT_END, and MRPT_START.
|
inherited |
Computes the log-likelihood of a given observation given an arbitrary robot 3D pose.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
obs | The observation. |
Definition at line 196 of file CMetricMap.cpp.
Referenced by mrpt::maps::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle().
|
inherited |
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 86 of file CMetricMap.cpp.
|
inherited |
Returns the sum of the log-likelihoods of each individual observation within a mrpt::obs::CSensoryFrame.
See: Maps and observations compatibility matrix
takenFrom | The robot's pose the observation is supposed to be taken from. |
sf | The set of observations in a CSensoryFrame. |
Definition at line 75 of file CMetricMap.cpp.
References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().
Referenced by mrpt::hmtslam::CLSLAM_RBPF_2DLASER::auxiliarComputeObservationLikelihood().
|
static |
|
static |
|
protected |
Deletes all maps and clears the internal lists of maps (with clear_unique(), so user copies remain alive)
Definition at line 263 of file CMultiMetricMap.cpp.
References m_ID, maps, and MapExecutor::run().
Referenced by setListOfMaps().
|
virtual |
Computes the matching between this and another 2D point map, which includes finding:
The algorithm is:
This method is the most time critical one into ICP-like algorithms.
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. |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 362 of file CMultiMetricMap.cpp.
References ASSERTMSG_, m_pointsMaps, MRPT_END, MRPT_START, and mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::size().
|
virtualinherited |
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:
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. |
Reimplemented in mrpt::maps::CPointsMap.
Definition at line 150 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and THROW_EXCEPTION.
Referenced by mrpt::slam::CICP::ICP3D_Method_Classic().
|
virtual |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
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 162 of file CObject.h.
References mrpt::utils::CObjectPtr.
Referenced by mrpt::obs::CRawlog::addActions(), mrpt::slam::CIncrementalMapPartitioner::addMapFrame(), and mrpt::obs::CRawlog::addObservations().
|
inline |
Definition at line 154 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 155 of file maps/CMultiMetricMap.h.
|
virtual |
Returns a 3D object representing the map.
Implements mrpt::maps::CMetricMap.
Definition at line 407 of file CMultiMetricMap.cpp.
References MRPT_END, MRPT_START, and MapExecutor::run().
|
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.
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 from mrpt::maps::CMetricMap.
Definition at line 451 of file CMultiMetricMap.cpp.
References ASSERT_, mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::empty(), m_pointsMaps, MRPT_END, MRPT_START, and mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::size().
|
virtual |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 459 of file CMultiMetricMap.cpp.
References ASSERT_, mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::empty(), m_pointsMaps, MRPT_END, MRPT_START, and mrpt::maps::CMultiMetricMap::ProxyFilterContainerByClass< SELECTED_CLASS_PTR, CONTAINER >::size().
|
inline |
Returns the i'th observation of a given class (or of a descendant class), or NULL if there is no such observation in the array.
Example:
By default (ith=0), the first observation is returned.
Definition at line 168 of file maps/CMultiMetricMap.h.
References begin().
mrpt::maps::CMetricMapPtr CMultiMetricMap::getMapByIndex | ( | size_t | idx | ) | const |
Gets the i-th map.
std::runtime_error | On out-of-bounds |
Definition at line 470 of file CMultiMetricMap.cpp.
References ASSERT_BELOW_, and maps.
|
virtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::maps::CMetricMap.
|
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 52 of file CObservable.h.
Referenced by mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().
|
inherited |
Insert the observation information into this map.
This method must be implemented in derived classes. See: Maps and observations compatibility matrix
obs | The observation |
robotPose | The 3D pose of the robot mobile base in the map reference system, or NULL (default) if you want to use the origin. |
Definition at line 102 of file CMetricMap.cpp.
Referenced by ICPTests::align2scans(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_likelihoodField_Thrun(), mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::getICPEdge(), CAngularObservationMesh_fnctr::operator()(), TEST(), and mrpt::graphslam::CGraphSlamEngine< GRAPH_T >::updateMapVisualization().
|
inherited |
A wrapper for smart pointers, just calls the non-smart pointer version.
See: Maps and observations compatibility matrix
Definition at line 118 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, and THROW_EXCEPTION.
Referenced by mrpt::slam::CMetricMapBuilderICP::processObservation().
|
protectedvirtual |
Returns true if any of the inner maps is able to compute a sensible likelihood function for this observation.
obs | The observation. |
Reimplemented from mrpt::maps::CMetricMap.
Definition at line 335 of file CMultiMetricMap.cpp.
References MapExecutor::run().
|
protectedvirtual |
Clear all elements of the map.
Implements mrpt::maps::CMetricMap.
Definition at line 256 of file CMultiMetricMap.cpp.
References MapExecutor::run().
|
protectedvirtual |
Internal method called by computeObservationLikelihood()
Implements mrpt::maps::CMetricMap.
Definition at line 321 of file CMultiMetricMap.cpp.
References MRPT_CHECK_NORMAL_NUMBER, and MapExecutor::run().
|
protectedvirtual |
Internal method called by insertObservation()
Implements mrpt::maps::CMetricMap.
Definition at line 349 of file CMultiMetricMap.cpp.
References MapExecutor::run().
|
virtual |
Returns true if all maps returns true to their isEmpty() method, which is map-dependent. Read the docs of each map class.
Implements mrpt::maps::CMetricMap.
Definition at line 378 of file CMultiMetricMap.cpp.
References MapExecutor::run().
|
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.
std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
Definition at line 48 of file CMetricMap.cpp.
References mrpt::utils::clear(), mrpt::maps::CSimpleMap::get(), and mrpt::maps::CSimpleMap::size().
Referenced by run_test_pf_localization().
|
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.
std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
Definition at line 105 of file maps/CMetricMap.h.
Referenced by mrpt::maps::CRandomFieldGridMap2D::internal_clear().
Definition at line 126 of file maps/CMultiMetricMap.h.
Definition at line 126 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 126 of file maps/CMultiMetricMap.h.
Definition at line 126 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 126 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 126 of file maps/CMultiMetricMap.h.
Definition at line 126 of file maps/CMultiMetricMap.h.
|
inline |
Definition at line 126 of file maps/CMultiMetricMap.h.
CMultiMetricMap & CMultiMetricMap::operator= | ( | const CMultiMetricMap & | o | ) |
Definition at line 199 of file CMultiMetricMap.cpp.
Called when you want this object to emit an event to all the observers currently subscribed to this object.
Definition at line 49 of file CObservable.cpp.
References MRPT_END, and MRPT_START.
Referenced by mrpt::gui::CDisplayWindow3D::internal_emitGrabImageEvent(), mrpt::gui::CWindowDialog::OnChar(), mrpt::gui::CWindowDialog::OnClose(), mrpt::gui::C3DWindowDialog::OnClose(), mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), mrpt::gui::C3DWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().
|
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.
in | The input binary stream where the object data must read from. |
version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 295 of file CMultiMetricMap.cpp.
References m_ID, maps, MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, and version.
|
virtual |
The implementation in this class just calls all the corresponding method of the contained metric maps.
Implements mrpt::maps::CMetricMap.
Definition at line 386 of file CMultiMetricMap.cpp.
References ASSERT_, mrpt::utils::TRuntimeClassId::className, mrpt::format(), mrpt::maps::CMetricMap::GetRuntimeClass(), maps, MRPT_END, MRPT_START, and mrpt::maps::CMetricMap::saveMetricMapRepresentationToFile().
void CMultiMetricMap::setListOfMaps | ( | const mrpt::maps::TSetOfMetricMapInitializers * | initializers | ) |
Sets the list of internal map according to the passed list of map initializers (Current maps' content will be deleted!)
Definition at line 225 of file CMultiMetricMap.cpp.
References ASSERT_, mrpt::maps::TSetOfMetricMapInitializers::begin(), deleteAllMaps(), mrpt::maps::TSetOfMetricMapInitializers::end(), mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), mrpt::maps::internal::TMetricMapTypesRegistry::Instance(), maps, MRPT_END, and MRPT_START.
Referenced by CMultiMetricMap(), mrpt::slam::CMetricMapBuilderICP::initialize(), and run_test_pf_localization().
|
inline |
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 294 of file maps/CMultiMetricMap.h.
References setListOfMaps().
Referenced by setListOfMaps().
|
virtualinherited |
Returns the square distance from the 2D point (x0,y0) to the closest correspondence in the map.
Reimplemented in mrpt::maps::CPointsMap.
Definition at line 178 of file CMetricMap.cpp.
References MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and THROW_EXCEPTION.
|
inlinevirtualinherited |
Introduces a pure virtual method responsible for writing to a mxArray
Matlab object, typically a MATLAB struct
whose contents are documented in each derived class.
mxArray
(caller is responsible of memory freeing) or NULL is class does not support conversion to MATLAB. Definition at line 79 of file CSerializable.h.
|
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.
out | The output binary stream where object must be dumped. |
getVersion | If 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. |
std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
Definition at line 277 of file CMultiMetricMap.cpp.
|
staticprotected |
Definition at line 126 of file maps/CMultiMetricMap.h.
|
staticinherited |
Definition at line 57 of file maps/CMetricMap.h.
|
static |
Definition at line 126 of file maps/CMultiMetricMap.h.
|
staticinherited |
|
staticinherited |
Definition at line 42 of file CSerializable.h.
|
static |
Definition at line 126 of file maps/CMultiMetricMap.h.
|
inherited |
Common params to all maps.
Definition at line 227 of file maps/CMetricMap.h.
Referenced by mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), mrpt::maps::CGasConcentrationGridMap2D::getAs3DObject(), mrpt::maps::CReflectivityGridMap2D::getAs3DObject(), mrpt::maps::CHeightGridMap2D::getAs3DObject(), mrpt::maps::CBeaconMap::getAs3DObject(), mrpt::maps::CRandomFieldGridMap2D::getAs3DObject(), mrpt::maps::CLandmarksMap::getAs3DObject(), mrpt::maps::CPointsMap::getAs3DObject(), mrpt::maps::CGasConcentrationGridMap2D::readFromStream(), mrpt::maps::CReflectivityGridMap2D::readFromStream(), mrpt::maps::CGasConcentrationGridMap2D::writeToStream(), and mrpt::maps::CReflectivityGridMap2D::writeToStream().
ProxySelectorContainerByClass<mrpt::maps::CBeaconMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_beaconMap |
Proxy that looks like a smart pointer to the first matching object in maps.
Definition at line 273 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::CColouredOctoMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_colourOctoMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 264 of file maps/CMultiMetricMap.h.
ProxySelectorContainerByClass<mrpt::maps::CColouredPointsMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_colourPointsMap |
Proxy that looks like a smart pointer to the first matching object in maps.
Definition at line 270 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::CGasConcentrationGridMap2DPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_gasGridMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 265 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::COccupancyGridMap2DPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_gridMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 262 of file maps/CMultiMetricMap.h.
Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::detectors::CDetectorDoorCrossing::process(), mrpt::slam::CMetricMapBuilderICP::processObservation(), run_test_pf_localization(), and mrpt::slam::CMetricMapBuilderICP::saveCurrentEstimationToImage().
ProxyFilterContainerByClass<mrpt::maps::CHeightGridMap2DPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_heightMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 267 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::CHeightGridMap2D_MRFPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_heightMRFMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 268 of file maps/CMultiMetricMap.h.
unsigned int mrpt::maps::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 329 of file maps/CMultiMetricMap.h.
Referenced by deleteAllMaps(), operator=(), readFromStream(), and writeToStream().
ProxySelectorContainerByClass<mrpt::maps::CLandmarksMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_landmarksMap |
Proxy that looks like a smart pointer to the first matching object in maps.
Definition at line 272 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::COctoMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_octoMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 263 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::CSimplePointsMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_pointsMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 261 of file maps/CMultiMetricMap.h.
Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), determineMatching2D(), getAsSimplePointsMap(), mrpt::slam::CMetricMapBuilderICP::getCurrentMapPoints(), mrpt::detectors::CDetectorDoorCrossing::process(), and mrpt::slam::CMetricMapBuilderICP::processObservation().
ProxyFilterContainerByClass<mrpt::maps::CReflectivityGridMap2DPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_reflectivityMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 269 of file maps/CMultiMetricMap.h.
ProxySelectorContainerByClass<mrpt::maps::CWeightedPointsMapPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_weightedPointsMap |
Proxy that looks like a smart pointer to the first matching object in maps.
Definition at line 271 of file maps/CMultiMetricMap.h.
ProxyFilterContainerByClass<mrpt::maps::CWirelessPowerGridMap2DPtr,TListMaps> mrpt::maps::CMultiMetricMap::m_wifiGridMaps |
STL-like proxy to access this kind of maps in maps.
Definition at line 266 of file maps/CMultiMetricMap.h.
TListMaps mrpt::maps::CMultiMetricMap::maps |
The list of MRPT metric maps in this object.
Use dynamic_cast or smart pointer-based downcast to access maps by their actual type. You can directly manipulate this list. Helper methods to initialize it are described in the docs of CMultiMetricMap
Definition at line 148 of file maps/CMultiMetricMap.h.
Referenced by compute3DMatchingRatio(), deleteAllMaps(), getMapByIndex(), operator=(), readFromStream(), saveMetricMapRepresentationToFile(), setListOfMaps(), and writeToStream().
Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |