A 2D grid map representing the reflectivity of the environment (for example, measured with an IR proximity sensor).
Important implemented features are:
Each cell contains the up-to-date average height from measured falling in that cell. Algorithms that can be used:
#include <mrpt/slam/CReflectivityGridMap2D.h>

Classes | |
| struct | TInsertionOptions |
| Parameters related with inserting observations into the map. More... | |
Public Types | |
| typedef TCELL | cell_t |
| The type of cells. | |
| typedef detail::logoddscell_traits < TCELL > | traits_t |
Public Member Functions | |
| void | clear () |
| Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes. | |
| float | cell2float (const int8_t &c) const |
| CReflectivityGridMap2D (float x_min=-2, float x_max=2, float y_min=-2, float y_max=2, float resolution=0.1) | |
| Constructor. | |
| bool | isEmpty () const |
| Returns true if the map is empty/no observation has been inserted. | |
| double | computeObservationLikelihood (const CObservation *obs, const CPose3D &takenFrom) |
| Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map. | |
| float | compute3DMatchingRatio (const CMetricMap *otherMap, const CPose3D &otherMapPose, float minDistForCorr=0.10f, float minMahaDistForCorr=2.0f) const |
| Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps. | |
| void | saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const |
| The implementation in this class just calls all the corresponding method of the contained metric maps. | |
| void | getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const |
| Returns a 3D object representing the map: by default, it will be a mrpt::opengl::CMesh object, unless it is specified otherwise in mrpt:: | |
| void | getAsImage (utils::CImage &img, bool verticalFlip=false, bool forceRGB=false) const |
| Returns the grid as a 8-bit graylevel image, where each pixel is a cell (output image is RGB only if forceRGB is true) | |
| 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 CSimplePointsMap * | getAsSimplePointsMap () 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 CSimplePointsMap * | getAsSimplePointsMap () |
| 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). | |
| CObject * | clone () 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 T &value) |
| Fills all the cells with the same value. | |
| virtual void | resize (float new_x_min, float new_x_max, float new_y_min, float new_y_max, const T &defaultValueNewCells, float additionalMarginMeters=2.0f) |
| Changes the size of the grid, maintaining previous contents. | |
| T * | cellByPos (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 T * | cellByPos (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. | |
| T * | cellByIndex (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 T * | cellByIndex (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. | |
| virtual float | cell2float (const T &c) const |
| The user must implement this in order to provide "saveToTextFile" a way to convert each cell into a numeric value. | |
| 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. | |
Static Public Member Functions | |
| static void | updateCell_fast_occupied (const unsigned x, const unsigned y, const cell_t logodd_obs, const cell_t thres, cell_t *mapArray, const unsigned _size_x) |
| Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly. | |
| static void | updateCell_fast_occupied (cell_t *theCell, const cell_t logodd_obs, const cell_t thres) |
| Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly. | |
| static void | updateCell_fast_free (const unsigned x, const unsigned y, const cell_t logodd_obs, const cell_t thres, cell_t *mapArray, const unsigned _size_x) |
| Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly. | |
| static void | updateCell_fast_free (cell_t *theCell, const cell_t logodd_obs, const cell_t thres) |
| Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly. | |
Public Attributes | |
| mrpt::slam::CReflectivityGridMap2D::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 | classCSerializable |
Protected Member Functions | |
| virtual void | internal_clear () |
| Erase all the contents of the map. | |
| virtual bool | internal_insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL) |
| Insert the observation information into this map. | |
| virtual void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const =0 |
| Introduces a pure virtual method responsible for writing to a CStream. | |
| virtual void | readFromStream (mrpt::utils::CStream &in, int version)=0 |
| 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. | |
| 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< T > & | m_map_castaway_const () const |
| Used only from logically const method that really need to modify the object. | |
Protected Attributes | |
| std::vector< T > | m_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 |
Static Protected Attributes | |
| static CLogOddsGridMapLUT< cell_t > | m_logodd_lut |
| Lookup tables for log-odds. | |
RTTI stuff | |
| typedef CReflectivityGridMap2DPtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CReflectivityGridMap2D |
| static mrpt::utils::TRuntimeClassId | classCReflectivityGridMap2D |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CReflectivityGridMap2DPtr | Create () |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCMetricMap |
| class | mrpt::utils::CStream |
typedef TCELL mrpt::slam::CLogOddsGridMap2D::cell_t [inherited] |
The type of cells.
Definition at line 69 of file CLogOddsGridMap2D.h.
A typedef for the associated smart pointer
Definition at line 72 of file CReflectivityGridMap2D.h.
typedef detail::logoddscell_traits<TCELL> mrpt::slam::CLogOddsGridMap2D::traits_t [inherited] |
Definition at line 70 of file CLogOddsGridMap2D.h.
| mrpt::slam::CReflectivityGridMap2D::CReflectivityGridMap2D | ( | float | x_min = -2, |
| float | x_max = 2, |
||
| float | y_min = -2, |
||
| float | y_max = 2, |
||
| float | resolution = 0.1 |
||
| ) |
Constructor.
| static const mrpt::utils::TRuntimeClassId* mrpt::slam::CReflectivityGridMap2D::_GetBaseClass | ( | ) | [static, protected] |
Reimplemented from mrpt::slam::CMetricMap.
| virtual void mrpt::slam::CMetricMap::auxParticleFilterCleanUp | ( | ) | [inline, virtual, inherited] |
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 | ) | [inline, virtual, 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).
| obs | The observation. |
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).
| sf | The observations. |
| float mrpt::slam::CReflectivityGridMap2D::cell2float | ( | const int8_t & | c | ) | const [inline] |
Definition at line 84 of file CReflectivityGridMap2D.h.
| virtual float mrpt::utils::CDynamicGrid::cell2float | ( | const T & | c | ) | const [inline, virtual, inherited] |
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.
| T* mrpt::utils::CDynamicGrid::cellByIndex | ( | unsigned int | cx, |
| unsigned int | cy | ||
| ) | [inline, inherited] |
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 T* mrpt::utils::CDynamicGrid::cellByIndex | ( | unsigned int | cx, |
| unsigned int | cy | ||
| ) | const [inline, inherited] |
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.
| T* mrpt::utils::CDynamicGrid::cellByPos | ( | float | x, |
| float | y | ||
| ) | [inline, inherited] |
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 T* mrpt::utils::CDynamicGrid::cellByPos | ( | float | x, |
| float | y | ||
| ) | const [inline, inherited] |
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::CReflectivityGridMap2D::clear | ( | void | ) | [inline] |
Calls the base CMetricMap::clear Declared here to avoid ambiguity between the two clear() in both base classes.
Reimplemented from mrpt::slam::CMetricMap.
Definition at line 82 of file CReflectivityGridMap2D.h.
References mrpt::slam::CMetricMap::clear().
| CObject* mrpt::utils::CObject::clone | ( | ) | const [inline, inherited] |
Cloning interface for smart pointers.
Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.
| float mrpt::slam::CReflectivityGridMap2D::compute3DMatchingRatio | ( | const CMetricMap * | otherMap, |
| const CPose3D & | otherMapPose, | ||
| float | minDistForCorr = 0.10f, |
||
| float | minMahaDistForCorr = 2.0f |
||
| ) | const [virtual] |
Computes the ratio in [0,1] of correspondences between "this" and the "otherMap" map, whose 6D pose relative to "this" is "otherMapPose" In the case of a multi-metric map, this returns the average between the maps.
This method always return 0 for grid maps.
| 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. |
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 [inline, virtual, inherited] |
Computes the matchings between this and another 2D points map.
This includes finding:
| 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. |
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_START, THROW_EXCEPTION, and MRPT_END.
| 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 [inline, virtual, inherited] |
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.
| 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. |
Reimplemented in mrpt::slam::CPointsMap.
Definition at line 272 of file CMetricMap.h.
References MRPT_START, THROW_EXCEPTION, and MRPT_END.
| double mrpt::slam::CReflectivityGridMap2D::computeObservationLikelihood | ( | const CObservation * | obs, |
| const CPose3D & | takenFrom | ||
| ) | [virtual] |
Computes the likelihood that a given observation was taken from a given pose in the world being modeled with this map.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| obs | The observation. |
Implements mrpt::slam::CMetricMap.
| double mrpt::slam::CMetricMap::computeObservationLikelihood | ( | const CObservation * | obs, |
| const CPose2D & | takenFrom | ||
| ) | [inline, inherited] |
Computes the log-likelihood of a given observation given an arbitrary robot 2D pose.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| obs | The observation. |
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.
| takenFrom | The robot's pose the observation is supposed to be taken from. |
| sf | The set of observations in a CSensoryFrame. |
| static CReflectivityGridMap2DPtr mrpt::slam::CReflectivityGridMap2D::Create | ( | ) | [static] |
| static mrpt::utils::CObject* mrpt::slam::CReflectivityGridMap2D::CreateObject | ( | ) | [static] |
| virtual mrpt::utils::CObject* mrpt::slam::CReflectivityGridMap2D::duplicate | ( | ) | const [virtual] |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
| mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr | ( | ) | const [inline, inherited] |
| void mrpt::utils::CDynamicGrid::fill | ( | const T & | value | ) | [inline, inherited] |
Fills all the cells with the same value.
Definition at line 116 of file CDynamicGrid.h.
| void mrpt::slam::CReflectivityGridMap2D::getAs3DObject | ( | mrpt::opengl::CSetOfObjectsPtr & | outObj | ) | const [virtual] |
Returns a 3D object representing the map: by default, it will be a mrpt::opengl::CMesh object, unless it is specified otherwise in mrpt::
Implements mrpt::slam::CMetricMap.
| void mrpt::slam::CReflectivityGridMap2D::getAsImage | ( | utils::CImage & | img, |
| bool | verticalFlip = false, |
||
| bool | forceRGB = false |
||
| ) | const |
Returns the grid as a 8-bit graylevel image, where each pixel is a cell (output image is RGB only if forceRGB is true)
| void mrpt::utils::CDynamicGrid::getAsMatrix | ( | MAT & | m | ) | const [inline, inherited] |
Get the entire grid as a matrix.
| MAT | The type of the matrix, typically a CMatrixDouble. |
| [out] | m | The output matrix; will be set automatically to the correct size. Entry (cy,cx) in the matrix contains the grid cell with indices (cx,cy). |
Definition at line 329 of file CDynamicGrid.h.
| virtual const CSimplePointsMap* mrpt::slam::CMetricMap::getAsSimplePointsMap | ( | ) | const [inline, virtual, inherited] |
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 | ( | ) | [inline, virtual, inherited] |
Reimplemented in mrpt::slam::CPointsMap, mrpt::slam::CMultiMetricMap, and mrpt::slam::CSimplePointsMap.
Definition at line 347 of file CMetricMap.h.
| float mrpt::utils::CDynamicGrid::getResolution | ( | ) | const [inline, inherited] |
Returns the resolution of the grid map.
Definition at line 278 of file CDynamicGrid.h.
| virtual const mrpt::utils::TRuntimeClassId* mrpt::slam::CReflectivityGridMap2D::GetRuntimeClass | ( | ) | const [virtual] |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::slam::CMetricMap.
| size_t mrpt::utils::CDynamicGrid::getSizeX | ( | ) | const [inline, inherited] |
Returns the horizontal size of grid map in cells count.
Definition at line 254 of file CDynamicGrid.h.
| size_t mrpt::utils::CDynamicGrid::getSizeY | ( | ) | const [inline, inherited] |
Returns the vertical size of grid map in cells count.
Definition at line 258 of file CDynamicGrid.h.
| float mrpt::utils::CDynamicGrid::getXMax | ( | ) | const [inline, inherited] |
Returns the "x" coordinate of right side of grid map.
Definition at line 266 of file CDynamicGrid.h.
| float mrpt::utils::CDynamicGrid::getXMin | ( | ) | const [inline, inherited] |
Returns the "x" coordinate of left side of grid map.
Definition at line 262 of file CDynamicGrid.h.
| float mrpt::utils::CDynamicGrid::getYMax | ( | ) | const [inline, inherited] |
Returns the "y" coordinate of bottom side of grid map.
Definition at line 274 of file CDynamicGrid.h.
| float mrpt::utils::CDynamicGrid::getYMin | ( | ) | const [inline, inherited] |
Returns the "y" coordinate of top side of grid map.
Definition at line 270 of file CDynamicGrid.h.
| bool mrpt::utils::CObservable::hasSubscribers | ( | ) | const [inline, protected, inherited] |
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::idx2cxcy | ( | const int & | idx, |
| int & | cx, | ||
| int & | cy | ||
| ) | const [inline, inherited] |
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::idx2x | ( | int | cx | ) | const [inline, inherited] |
Transform a cell index into a coordinate value.
Definition at line 314 of file CDynamicGrid.h.
| float mrpt::utils::CDynamicGrid::idx2y | ( | int | cy | ) | const [inline, inherited] |
Definition at line 315 of file CDynamicGrid.h.
| bool mrpt::slam::CMetricMap::insertObservation | ( | const CObservation * | obs, |
| const CPose3D * | robotPose = NULL |
||
| ) | [inline, inherited] |
Insert the observation information into this map.
This method must be implemented in derived classes.
| 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 133 of file CMetricMap.h.
| bool mrpt::slam::CMetricMap::insertObservationPtr | ( | const CObservationPtr & | obs, |
| const CPose3D * | robotPose = NULL |
||
| ) | [inline, inherited] |
A wrapper for smart pointers, just calls the non-smart pointer version.
Definition at line 147 of file CMetricMap.h.
References MRPT_START, THROW_EXCEPTION, mrpt::slam::CObservationPtr::pointer(), and MRPT_END.
| virtual void mrpt::slam::CReflectivityGridMap2D::internal_clear | ( | ) | [protected, virtual] |
Erase all the contents of the map.
Implements mrpt::slam::CMetricMap.
| virtual bool mrpt::slam::CReflectivityGridMap2D::internal_insertObservation | ( | const CObservation * | obs, |
| const CPose3D * | robotPose = NULL |
||
| ) | [protected, virtual] |
Insert the observation information into this map.
This method must be implemented in derived classes.
| 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 CPose2D(0,0,deg) |
Implements mrpt::slam::CMetricMap.
| bool mrpt::slam::CReflectivityGridMap2D::isEmpty | ( | ) | const [virtual] |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::slam::CMetricMap.
| void mrpt::slam::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.
| std::exception | Some internal steps in invoked methods can raise exceptions on invalid parameters, etc... |
| void mrpt::slam::CMetricMap::loadFromSimpleMap | ( | const CSimpleMap & | Map | ) | [inline, 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 124 of file CMetricMap.h.
| std::vector<T>& mrpt::utils::CDynamicGrid::m_map_castaway_const | ( | ) | const [inline, protected, inherited] |
Used only from logically const method that really need to modify the object.
Definition at line 52 of file CDynamicGrid.h.
| void mrpt::utils::CObservable::publishEvent | ( | const mrptEvent & | e | ) | const [protected, inherited] |
Called when you want this object to emit an event to all the observers currently subscribed to this object.
| virtual void mrpt::utils::CSerializable::readFromStream | ( | mrpt::utils::CStream & | in, |
| int | version | ||
| ) | [protected, pure virtual, inherited] |
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 |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
| virtual void mrpt::utils::CDynamicGrid::resize | ( | float | new_x_min, |
| float | new_x_max, | ||
| float | new_y_min, | ||
| float | new_y_max, | ||
| const T & | defaultValueNewCells, | ||
| float | additionalMarginMeters = 2.0f |
||
| ) | [inline, virtual, inherited] |
Changes the size of the grid, maintaining previous contents.
Definition at line 121 of file CDynamicGrid.h.
| void mrpt::slam::CReflectivityGridMap2D::saveMetricMapRepresentationToFile | ( | const std::string & | filNamePrefix | ) | const [virtual] |
The implementation in this class just calls all the corresponding method of the contained metric maps.
Implements mrpt::slam::CMetricMap.
| void mrpt::utils::CDynamicGrid::saveToTextFile | ( | const std::string & | fileName | ) | const [inline, inherited] |
Definition at line 286 of file CDynamicGrid.h.
| void mrpt::utils::CDynamicGrid::setSize | ( | float | x_min, |
| float | x_max, | ||
| float | y_min, | ||
| float | y_max, | ||
| float | resolution | ||
| ) | [inline, inherited] |
Changes the size of the grid, ERASING all previous contents.
Definition at line 83 of file CDynamicGrid.h.
| virtual float mrpt::slam::CMetricMap::squareDistanceToClosestCorrespondence | ( | const float & | x0, |
| const float & | y0 | ||
| ) | const [inline, virtual, inherited] |
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_START, THROW_EXCEPTION, and MRPT_END.
| static void mrpt::slam::CLogOddsGridMap2D::updateCell_fast_free | ( | const unsigned | x, |
| const unsigned | y, | ||
| const cell_t | logodd_obs, | ||
| const cell_t | thres, | ||
| cell_t * | mapArray, | ||
| const unsigned | _size_x | ||
| ) | [inline, static, inherited] |
Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly.
This method increases the "free-ness" of a cell, managing possible saturation.
| x | Cell index in X axis. |
| y | Cell index in Y axis. |
| logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
| thres | This must be CELLTYPE_MAX-logodd_obs |
Definition at line 119 of file CLogOddsGridMap2D.h.
| static void mrpt::slam::CLogOddsGridMap2D::updateCell_fast_free | ( | cell_t * | theCell, |
| const cell_t | logodd_obs, | ||
| const cell_t | thres | ||
| ) | [inline, static, inherited] |
Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly.
This method increases the "free-ness" of a cell, managing possible saturation.
| x | Cell index in X axis. |
| y | Cell index in Y axis. |
| logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
| thres | This must be CELLTYPE_MAX-logodd_obs |
Definition at line 141 of file CLogOddsGridMap2D.h.
| static void mrpt::slam::CLogOddsGridMap2D::updateCell_fast_occupied | ( | const unsigned | x, |
| const unsigned | y, | ||
| const cell_t | logodd_obs, | ||
| const cell_t | thres, | ||
| cell_t * | mapArray, | ||
| const unsigned | _size_x | ||
| ) | [inline, static, inherited] |
Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly.
This method increases the "occupancy-ness" of a cell, managing possible saturation.
| x | Cell index in X axis. |
| y | Cell index in Y axis. |
| logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
| thres | This must be CELLTYPE_MIN+logodd_obs |
Definition at line 80 of file CLogOddsGridMap2D.h.
| static void mrpt::slam::CLogOddsGridMap2D::updateCell_fast_occupied | ( | cell_t * | theCell, |
| const cell_t | logodd_obs, | ||
| const cell_t | thres | ||
| ) | [inline, static, inherited] |
Performs the Bayesian fusion of a new observation of a cell, without checking for grid limits nor updateInfoChangeOnly.
This method increases the "occupancy-ness" of a cell, managing possible saturation.
| theCell | The cell to modify |
| logodd_obs | Observation of the cell, in log-odd form as transformed by p2l. |
| thres | This must be CELLTYPE_MIN+logodd_obs |
Definition at line 101 of file CLogOddsGridMap2D.h.
| virtual void mrpt::utils::CSerializable::writeToStream | ( | mrpt::utils::CStream & | out, |
| int * | getVersion | ||
| ) | const [protected, pure virtual, inherited] |
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 |
Implemented in mrpt::math::CMatrixD, and mrpt::math::CMatrix.
| int mrpt::utils::CDynamicGrid::x2idx | ( | float | x | ) | const [inline, inherited] |
Transform a coordinate values into cell indexes.
Definition at line 301 of file CDynamicGrid.h.
| int mrpt::utils::CDynamicGrid::x2idx | ( | float | x, |
| float | x_min | ||
| ) | const [inline, inherited] |
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::xy2idx | ( | float | x, |
| float | y | ||
| ) | const [inline, inherited] |
Definition at line 303 of file CDynamicGrid.h.
| int mrpt::utils::CDynamicGrid::y2idx | ( | float | y | ) | const [inline, inherited] |
Definition at line 302 of file CDynamicGrid.h.
| int mrpt::utils::CDynamicGrid::y2idx | ( | float | y, |
| float | y_min | ||
| ) | const [inline, inherited] |
Definition at line 320 of file CDynamicGrid.h.
friend class mrpt::utils::CStream [friend, inherited] |
Reimplemented from mrpt::utils::CSerializable.
Reimplemented in mrpt::slam::CRandomFieldGridMap2D, and mrpt::slam::CPointsMap.
Definition at line 81 of file CMetricMap.h.
mrpt::utils::CLASSINIT mrpt::slam::CReflectivityGridMap2D::_init_CReflectivityGridMap2D [static, protected] |
Definition at line 72 of file CReflectivityGridMap2D.h.
const mrpt::utils::TRuntimeClassId mrpt::slam::CMetricMap::classCMetricMap [static, inherited] |
Definition at line 81 of file CMetricMap.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CObject::classCObject [static, inherited] |
mrpt::utils::TRuntimeClassId mrpt::slam::CReflectivityGridMap2D::classCReflectivityGridMap2D [static] |
Definition at line 72 of file CReflectivityGridMap2D.h.
const mrpt::utils::TRuntimeClassId mrpt::utils::CSerializable::classCSerializable [static, inherited] |
Definition at line 56 of file CSerializable.h.
Definition at line 72 of file CReflectivityGridMap2D.h.
| mrpt::slam::CReflectivityGridMap2D::TInsertionOptions mrpt::slam::CReflectivityGridMap2D::insertionOptions |
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.
CLogOddsGridMapLUT<cell_t> mrpt::slam::CReflectivityGridMap2D::m_logodd_lut [static, protected] |
Lookup tables for log-odds.
Definition at line 75 of file CReflectivityGridMap2D.h.
std::vector<T> mrpt::utils::CDynamicGrid::m_map [protected, inherited] |
The cells.
Definition at line 49 of file CDynamicGrid.h.
float mrpt::utils::CDynamicGrid::m_resolution [protected, inherited] |
Definition at line 55 of file CDynamicGrid.h.
size_t mrpt::utils::CDynamicGrid::m_size_x [protected, inherited] |
Definition at line 56 of file CDynamicGrid.h.
size_t mrpt::utils::CDynamicGrid::m_size_y [protected, inherited] |
Definition at line 56 of file CDynamicGrid.h.
float mrpt::utils::CDynamicGrid::m_x_max [protected, inherited] |
Definition at line 54 of file CDynamicGrid.h.
float mrpt::utils::CDynamicGrid::m_x_min [protected, inherited] |
Definition at line 54 of file CDynamicGrid.h.
float mrpt::utils::CDynamicGrid::m_y_max [protected, inherited] |
Definition at line 54 of file CDynamicGrid.h.
float mrpt::utils::CDynamicGrid::m_y_min [protected, inherited] |
Definition at line 54 of file CDynamicGrid.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |