#include <mrpt/slam/CMultiMetricMap.h>
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. | |
CMultiMetricMap (const mrpt::slam::TSetOfMetricMapInitializers *initializers=NULL, const TOptions *opts=NULL) | |
Constructor. | |
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!). | |
CMultiMetricMap (const mrpt::slam::CMultiMetricMap &other) | |
Copy constructor. | |
mrpt::slam::CMultiMetricMap & | operator= (const mrpt::slam::CMultiMetricMap &other) |
Copy operator from "other" object. | |
virtual | ~CMultiMetricMap () |
Destructor. | |
void | clear () |
Clear all elements of the map. | |
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 | getNewStaticPointsRatio (CPointsMap *points, CPose2D &takenFrom) |
Returns the ratio of points in a map which are new to the points map while falling into yet static cells of gridmap. | |
bool | insertObservation (const CObservation *obs, const CPose3D *robotPose=NULL) |
Insert the observation information into this map (see options). | |
void | computeMatchingWith2D (const CMetricMap *otherMap, const CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const CPose2D &angularDistPivotPoint, TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false) const |
See the definition in the base class: In this class calls to this method are passed to the inner points 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 | auxParticleFilterCleanUp () |
This method is called at the end of each "prediction-update-map insertion" cycle within "mrpt::slam::CMetricMapBuilderRBPF::processActionObservation". | |
void | getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const |
Returns a 3D object representing the map. | |
bool | canComputeObservationLikelihood (const CObservation *obs) |
Returns true if this map is able to compute a sensible likelihood function for this observation (i.e. | |
Public Attributes | |
mrpt::slam::CMultiMetricMap::TOptions | options |
Some options for this class:. | |
std::deque< CSimplePointsMapPtr > | m_pointsMaps |
Some of the internal metric maps (the number of point-maps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class). | |
CLandmarksMapPtr | m_landmarksMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class). | |
CBeaconMapPtr | m_beaconMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class). | |
std::deque < COccupancyGridMap2DPtr > | m_gridMaps |
Some of the internal metric maps (the number of gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class). | |
std::deque < CGasConcentrationGridMap2DPtr > | m_gasGridMaps |
Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class). | |
std::deque< CHeightGridMap2DPtr > | m_heightMaps |
Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class). | |
CColouredPointsMapPtr | m_colourPointsMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class). | |
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. | |
Protected Member Functions | |
void | deleteAllMaps () |
Deletes all maps and clears the internal lists of maps. | |
Static Private Attributes | |
static CLASSINIT | _init_CHybridMetricMap |
static TRuntimeClassId | classCHybridMetricMap |
The internal metric maps can be accessed directly by the user. If some kind of map is not desired, it can be just ignored, but if this fact is specified in the "CMultiMetricMap::mapsUsage" member some methods (as the observation insertion) will be more efficient since it will be invoked on desired maps only.
Currently these metric maps are supported for being kept internally::
See CMultiMetricMap::setListOfMaps() for the method for initializing this class.
Definition at line 68 of file CMultiMetricMap.h.
typedef std::pair<CPoint3D,unsigned int> mrpt::slam::CMultiMetricMap::TPairIdBeacon |
Definition at line 90 of file CMultiMetricMap.h.
mrpt::slam::CMultiMetricMap::CMultiMetricMap | ( | const mrpt::slam::TSetOfMetricMapInitializers * | initializers = NULL , |
|
const TOptions * | opts = NULL | |||
) |
Constructor.
initializers | One internal map will be created for each entry in this "TSetOfMetricMapInitializers" struct, and each map will be initialized with the corresponding options. | |
opts | If provided (not NULL), the member "options" will be initialized with those values. If initializers is NULL, no internal map will be created. |
mrpt::slam::CMultiMetricMap::CMultiMetricMap | ( | const mrpt::slam::CMultiMetricMap & | other | ) |
Copy constructor.
virtual mrpt::slam::CMultiMetricMap::~CMultiMetricMap | ( | ) | [virtual] |
Destructor.
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.
Implements mrpt::slam::CMetricMap.
bool mrpt::slam::CMultiMetricMap::canComputeObservationLikelihood | ( | const CObservation * | obs | ) | [virtual] |
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 from mrpt::slam::CMetricMap.
void mrpt::slam::CMultiMetricMap::clear | ( | ) | [virtual] |
float mrpt::slam::CMultiMetricMap::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.
void mrpt::slam::CMultiMetricMap::computeMatchingWith2D | ( | const CMetricMap * | otherMap, | |
const CPose2D & | otherMapPose, | |||
float | maxDistForCorrespondence, | |||
float | maxAngularDistForCorrespondence, | |||
const CPose2D & | angularDistPivotPoint, | |||
TMatchingPairList & | correspondences, | |||
float & | correspondencesRatio, | |||
float * | sumSqrDist = NULL , |
|||
bool | onlyKeepTheClosest = false , |
|||
bool | onlyUniqueRobust = false | |||
) | const [virtual] |
See the definition in the base class: In this class calls to this method are passed to the inner points map.
Reimplemented from mrpt::slam::CMetricMap.
double mrpt::slam::CMultiMetricMap::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.
void mrpt::slam::CMultiMetricMap::deleteAllMaps | ( | ) | [protected] |
Deletes all maps and clears the internal lists of maps.
void mrpt::slam::CMultiMetricMap::getAs3DObject | ( | mrpt::opengl::CSetOfObjectsPtr & | outObj | ) | const [virtual] |
float mrpt::slam::CMultiMetricMap::getNewStaticPointsRatio | ( | CPointsMap * | points, | |
CPose2D & | takenFrom | |||
) |
Returns the ratio of points in a map which are new to the points map while falling into yet static cells of gridmap.
points | The set of points to check. | |
takenFrom | The pose for the reference system of points, in global coordinates of this hybrid map. |
bool mrpt::slam::CMultiMetricMap::insertObservation | ( | const CObservation * | obs, | |
const CPose3D * | robotPose = NULL | |||
) | [virtual] |
Insert the observation information into this map (see options).
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::CMultiMetricMap::isEmpty | ( | ) | const [virtual] |
Returns true if the map is empty/no observation has been inserted.
Implements mrpt::slam::CMetricMap.
mrpt::slam::CMultiMetricMap& mrpt::slam::CMultiMetricMap::operator= | ( | const mrpt::slam::CMultiMetricMap & | other | ) |
Copy operator from "other" object.
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.
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!).
CLASSINIT mrpt::slam::CMultiMetricMap::_init_CHybridMetricMap [static, private] |
Definition at line 81 of file CMultiMetricMap.h.
TRuntimeClassId mrpt::slam::CMultiMetricMap::classCHybridMetricMap [static, private] |
Definition at line 82 of file CMultiMetricMap.h.
CBeaconMapPtr mrpt::slam::CMultiMetricMap::m_beaconMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 177 of file CMultiMetricMap.h.
CColouredPointsMapPtr mrpt::slam::CMultiMetricMap::m_colourPointsMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 193 of file CMultiMetricMap.h.
std::deque<CGasConcentrationGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_gasGridMaps |
Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 185 of file CMultiMetricMap.h.
std::deque<COccupancyGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_gridMaps |
Some of the internal metric maps (the number of gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 181 of file CMultiMetricMap.h.
std::deque<CHeightGridMap2DPtr> mrpt::slam::CMultiMetricMap::m_heightMaps |
Some of the internal metric maps (the number of gas gridmaps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 189 of file CMultiMetricMap.h.
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 305 of file CMultiMetricMap.h.
CLandmarksMapPtr mrpt::slam::CMultiMetricMap::m_landmarksMap |
One of the internal metric map (will be NULL if not used, what comes from the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 173 of file CMultiMetricMap.h.
std::deque<CSimplePointsMapPtr> mrpt::slam::CMultiMetricMap::m_pointsMaps |
Some of the internal metric maps (the number of point-maps depends on the the TSetOfMetricMapInitializers passed to the constructor of this class).
Definition at line 169 of file CMultiMetricMap.h.
Some options for this class:.
Page generated by Doxygen 1.5.7.1 for MRPT 0.6.5 SVN: at Mon Feb 23 13:35:09 EST 2009 |