Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions
mrpt::maps::CLandmarksMap Class Reference

Detailed Description

A class for storing a map of 3D probabilistic landmarks.


Currently these types of landmarks are defined: (see mrpt::maps::CLandmark)

Observation class: Generated Landmarks: Comments:
CObservationImage vlSIFT 1) A SIFT feature is created for each SIFT detected in the image,
2) Correspondences between SIFTs features and existing ones are finded by computeMatchingWith3DLandmarks,
3) The corresponding feaures are fused, and the new ones added, with an initial uncertainty according to insertionOptions
CObservationStereoImages vlSIFT Each image is separately procesed by the method for CObservationImage observations
CObservationStereoImages vlColor TODO...
CObservation2DRangeScan glOccupancy A landmark is added for each range in the scan, with its appropiate covariance matrix derived from the jacobians matrixes.
See also
CMetricMap

Definition at line 59 of file maps/CLandmarksMap.h.

#include <mrpt/maps/CLandmarksMap.h>

Inheritance diagram for mrpt::maps::CLandmarksMap:
Inheritance graph

Classes

struct  TCustomSequenceLandmarks
 The list of landmarks: the wrapper class is just for maintaining the KD-Tree representation. More...
 
struct  TFuseOptions
 With this struct options are provided to the fusion process. More...
 
struct  TInsertionOptions
 With this struct options are provided to the observation insertion process. More...
 
struct  TInsertionResults
 This struct stores extra results from invoking insertObservation. More...
 
struct  TLikelihoodOptions
 With this struct options are provided to the likelihood computations. More...
 
struct  TMapDefinition
 
struct  TMapDefinitionBase
 

Public Types

typedef mrpt::maps::CLandmark landmark_type
 

Public Member Functions

voidoperator new (size_t size)
 
voidoperator new[] (size_t size)
 
void operator delete (void *ptr) throw ()
 
void operator delete[] (void *ptr) throw ()
 
void operator delete (void *memory, void *ptr) throw ()
 
voidoperator new (size_t size, const std::nothrow_t &) throw ()
 
void operator delete (void *ptr, const std::nothrow_t &) throw ()
 
double internal_computeObservationLikelihood (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D &takenFrom) MRPT_OVERRIDE
 Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the world being modeled with this map. More...
 
 CLandmarksMap ()
 Constructor. More...
 
virtual ~CLandmarksMap ()
 Virtual destructor. More...
 
mrpt::maps::CLandmark::TLandmarkID getMapMaxID ()
 
float compute3DMatchingRatio (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, const TMatchingRatioParams &params) const MRPT_OVERRIDE
 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. More...
 
bool saveToTextFile (std::string file)
 Save to a text file. More...
 
bool saveToMATLABScript2D (std::string file, const char *style="b", float stdCount=2.0f)
 Save to a MATLAB script which displays 2D error ellipses for the map (top-view, projection on the XY plane). More...
 
bool saveToMATLABScript3D (std::string file, const char *style="b", float confInterval=0.95f) const
 Save to a MATLAB script which displays 3D error ellipses for the map. More...
 
size_t size () const
 Returns the stored landmarks count. More...
 
double computeLikelihood_RSLC_2007 (const CLandmarksMap *s, const mrpt::poses::CPose2D &sensorPose)
 Computes the (logarithmic) likelihood function for a sensed observation "o" according to "this" map. More...
 
void loadSiftFeaturesFromImageObservation (const mrpt::obs::CObservationImage &obs, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
 Loads into this landmarks map the SIFT features extracted from an image observation (Previous contents of map will be erased) The robot is assumed to be at the origin of the map. More...
 
void loadSiftFeaturesFromStereoImageObservation (const mrpt::obs::CObservationStereoImages &obs, mrpt::maps::CLandmark::TLandmarkID fID, const mrpt::vision::CFeatureExtraction::TOptions &feat_options=mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT))
 Loads into this landmarks map the SIFT features extracted from an observation consisting of a pair of stereo-image (Previous contents of map will be erased) The robot is assumed to be at the origin of the map. More...
 
void loadOccupancyFeaturesFrom2DRangeScan (const mrpt::obs::CObservation2DRangeScan &obs, const mrpt::poses::CPose3D *robotPose=NULL, unsigned int downSampleFactor=1)
 Loads into this landmarks-map a set of occupancy features according to a 2D range scan (Previous contents of map will be erased) More...
 
void computeMatchingWith2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, float maxDistForCorrespondence, float maxAngularDistForCorrespondence, const mrpt::poses::CPose2D &angularDistPivotPoint, mrpt::utils::TMatchingPairList &correspondences, float &correspondencesRatio, float *sumSqrDist=NULL, bool onlyKeepTheClosest=false, bool onlyUniqueRobust=false) const
 
void computeMatchingWith3DLandmarks (const mrpt::maps::CLandmarksMap *otherMap, mrpt::utils::TMatchingPairList &correspondences, float &correspondencesRatio, std::vector< bool > &otherCorrespondences) const
 Perform a search for correspondences between "this" and another lansmarks map: In this class, the matching is established solely based on the landmarks' IDs. More...
 
void changeCoordinatesReference (const mrpt::poses::CPose3D &newOrg)
 Changes the reference system of the map to a given 3D pose. More...
 
void changeCoordinatesReference (const mrpt::poses::CPose3D &newOrg, const mrpt::maps::CLandmarksMap *otherMap)
 Changes the reference system of the map "otherMap" and save the result in "this" map. More...
 
void fuseWith (CLandmarksMap &other, bool justInsertAllOfThem=false)
 Fuses the contents of another map with this one, updating "this" object with the result. More...
 
double computeLikelihood_SIFT_LandmarkMap (CLandmarksMap *map, mrpt::utils::TMatchingPairList *correspondences=NULL, std::vector< bool > *otherCorrespondences=NULL)
 Returns the (logarithmic) likelihood of a set of landmarks "map" given "this" map. More...
 
bool isEmpty () const MRPT_OVERRIDE
 Returns true if the map is empty/no observation has been inserted. More...
 
void simulateBeaconReadings (const mrpt::poses::CPose3D &in_robotPose, const mrpt::poses::CPoint3D &in_sensorLocationOnRobot, mrpt::obs::CObservationBeaconRanges &out_Observations) const
 Simulates a noisy reading toward each of the beacons in the landmarks map, if any. More...
 
void simulateRangeBearingReadings (const mrpt::poses::CPose3D &robotPose, const mrpt::poses::CPose3D &sensorLocationOnRobot, mrpt::obs::CObservationBearingRange &observations, bool sensorDetectsIDs=true, const float stdRange=0.01f, const float stdYaw=mrpt::utils::DEG2RAD(0.1f), const float stdPitch=mrpt::utils::DEG2RAD(0.1f), vector_size_t *real_associations=NULL, const double spurious_count_mean=0, const double spurious_count_std=0) const
 Simulates a noisy bearing-range observation of all the beacons (landamrks with type glBeacon) in the landmarks map, if any. More...
 
void saveMetricMapRepresentationToFile (const std::string &filNamePrefix) const MRPT_OVERRIDE
 This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface). More...
 
void getAs3DObject (mrpt::opengl::CSetOfObjectsPtr &outObj) const MRPT_OVERRIDE
 Returns a 3D object representing the map. More...
 
virtual 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 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 determineMatching2D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose2D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams &params, TMatchingExtraResults &extraResults) const
 Computes the matching between this and another 2D point map, which includes finding: More...
 
virtual void determineMatching3D (const mrpt::maps::CMetricMap *otherMap, const mrpt::poses::CPose3D &otherMapPose, mrpt::utils::TMatchingPairList &correspondences, const TMatchingParams &params, 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 const mrpt::maps::CSimplePointsMapgetAsSimplePointsMap () const
 If the map is a simple points map or it's a multi-metric map that contains EXACTLY one simple points map, return it. More...
 
virtual mrpt::maps::CSimplePointsMapgetAsSimplePointsMap ()
 
virtual mxArraywriteToMatlab () 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...
 
CObjectclone () 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 voidoperator new (size_t size, void *ptr)
 

Public Attributes

struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks landmarks
 
mrpt::maps::CLandmarksMap::TInsertionOptions insertionOptions
 
mrpt::maps::CLandmarksMap::TLikelihoodOptions likelihoodOptions
 
struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TInsertionResults insertionResults
 
struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TFuseOptions fuseOptions
 
TMapGenericParams genericMapParams
 Common params to all maps. More...
 

Static Public Attributes

static mrpt::utils::TColorf COLOR_LANDMARKS_IN_3DSCENES
 The color of landmark ellipsoids in CLandmarksMap::getAs3DObject. More...
 
static std::map< std::pair< mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID >, double > _mEDD
 Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks. More...
 
static mrpt::maps::CLandmark::TLandmarkID _mapMaxID
 
static bool _maxIDUpdated = false
 
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 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...
 

Private Member Functions

void internal_clear () MRPT_OVERRIDE
 Internal method called by clear() More...
 
bool internal_insertObservation (const mrpt::obs::CObservation *obs, const mrpt::poses::CPose3D *robotPose=NULL) MRPT_OVERRIDE
 Internal method called by insertObservation() More...
 

RTTI stuff

typedef CLandmarksMapPtr Ptr
 
typedef CLandmarksMapPtr ConstPtr
 
static mrpt::utils::CLASSINIT _init_CLandmarksMap
 
static mrpt::utils::TRuntimeClassId classCLandmarksMap
 
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 CLandmarksMapPtr Create ()
 

Map Definition Interface stuff (see mrpt::maps::TMetricMapInitializer) @{

static const size_t m_private_map_register_id = mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister( "CLandmarksMap,landmarksMap" ,& mrpt::maps::CLandmarksMap ::MapDefinition,& mrpt::maps::CLandmarksMap ::internal_CreateFromMapDefinition)
 ID used to initialize class registration (just ignore it) More...
 
static mrpt::maps::TMetricMapInitializerMapDefinition ()
 Returns default map definition initializer. More...
 
static CLandmarksMapCreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def)
 Constructor from a map definition structure: initializes the map and its parameters accordingly. More...
 
static mrpt::maps::CMetricMapinternal_CreateFromMapDefinition (const mrpt::maps::TMetricMapInitializer &def)
 

Member Typedef Documentation

◆ ConstPtr

typedef CLandmarksMapPtr mrpt::maps::CLandmarksMap::ConstPtr

Definition at line 62 of file maps/CLandmarksMap.h.

◆ landmark_type

Definition at line 87 of file maps/CLandmarksMap.h.

◆ Ptr

typedef CLandmarksMapPtr mrpt::maps::CLandmarksMap::Ptr

A typedef for the associated smart pointer

Definition at line 62 of file maps/CLandmarksMap.h.

Constructor & Destructor Documentation

◆ CLandmarksMap()

CLandmarksMap::CLandmarksMap ( )

Constructor.

Definition at line 133 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear(), and landmarks.

◆ ~CLandmarksMap()

CLandmarksMap::~CLandmarksMap ( )
virtual

Virtual destructor.

Definition at line 148 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear(), and landmarks.

Member Function Documentation

◆ _GetBaseClass()

static const mrpt::utils::TRuntimeClassId* mrpt::maps::CLandmarksMap::_GetBaseClass ( )
staticprotected

◆ auxParticleFilterCleanUp()

void CLandmarksMap::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::maps::CMetricMap.

Definition at line 2520 of file CLandmarksMap.cpp.

References _maxIDUpdated, and _mEDD.

◆ canComputeObservationLikelihood() [1/2]

bool CMetricMap::canComputeObservationLikelihood ( const mrpt::obs::CObservation obs) const
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

Parameters
obsThe observation.
See also
computeObservationLikelihood, genericMapParams.enableObservationLikelihood

Definition at line 189 of file CMetricMap.cpp.

◆ canComputeObservationLikelihood() [2/2]

bool mrpt::maps::CMetricMap::canComputeObservationLikelihood ( const mrpt::obs::CObservationPtr &  obs) const
inherited

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

◆ canComputeObservationsLikelihood()

bool CMetricMap::canComputeObservationsLikelihood ( const mrpt::obs::CSensoryFrame sf) const
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

Parameters
sfThe observations.
See also
canComputeObservationLikelihood

Definition at line 94 of file CMetricMap.cpp.

References mrpt::obs::CSensoryFrame::begin(), and mrpt::obs::CSensoryFrame::end().

◆ changeCoordinatesReference() [1/2]

void CLandmarksMap::changeCoordinatesReference ( const mrpt::poses::CPose3D newOrg)

◆ changeCoordinatesReference() [2/2]

void CLandmarksMap::changeCoordinatesReference ( const mrpt::poses::CPose3D newOrg,
const mrpt::maps::CLandmarksMap otherMap 
)

◆ clear()

void CMetricMap::clear ( )
inherited

◆ clone()

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

Cloning interface for smart pointers.

Definition at line 133 of file CObject.h.

◆ compute3DMatchingRatio()

float CLandmarksMap::compute3DMatchingRatio ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
const TMatchingRatioParams params 
) 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.

Parameters
otherMap[IN] The other map to compute the matching with.
otherMapPose[IN] The 6D pose of the other map as seen from "this".
params[IN] Matching parameters
Returns
The matching ratio [0,1]
See also
determineMatching2D

Reimplemented from mrpt::maps::CMetricMap.

Definition at line 2414 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), CLASS_ID, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::poses::CPose3D::getHomogeneousMatrix(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getLargestDistanceFromOrigin(), mrpt::maps::CMetricMap::GetRuntimeClass(), landmarks, MRPT_END, MRPT_START, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::size(), and mrpt::math::square().

◆ computeLikelihood_RSLC_2007()

double CLandmarksMap::computeLikelihood_RSLC_2007 ( const CLandmarksMap s,
const mrpt::poses::CPose2D sensorPose 
)

Computes the (logarithmic) likelihood function for a sensed observation "o" according to "this" map.

This is the implementation of the algorithm reported in the paper: J.L. Blanco, J. Gonzalez, and J.A. Fernandez-Madrigal, "A Consensus-based Approach for Estimating the Observation Likelihood of Accurate Range Sensors", in IEEE International Conference on Robotics and Automation (ICRA), Rome (Italy), Apr 10-14, 2007

Definition at line 1585 of file CLandmarksMap.cpp.

References ASSERT_, mrpt::utils::CDynamicGrid< T >::cellByIndex(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::get(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::getGrid(), mrpt::maps::CLandmark::getPose(), mrpt::utils::CDynamicGrid< T >::getSizeX(), mrpt::utils::CDynamicGrid< T >::getSizeY(), landmarks, min, MRPT_CHECK_NORMAL_NUMBER, MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, mrpt::maps::CLandmark::pose_mean, mrpt::poses::CPointPDFGaussian::productIntegralNormalizedWith2D(), mrpt::math::TPoint3D::x, mrpt::utils::CDynamicGrid< T >::x2idx(), mrpt::math::TPoint3D::y, and mrpt::utils::CDynamicGrid< T >::y2idx().

Referenced by internal_computeObservationLikelihood().

◆ computeLikelihood_SIFT_LandmarkMap()

double CLandmarksMap::computeLikelihood_SIFT_LandmarkMap ( CLandmarksMap map,
mrpt::utils::TMatchingPairList correspondences = NULL,
std::vector< bool > *  otherCorrespondences = NULL 
)

◆ computeMatchingWith2D()

void CLandmarksMap::computeMatchingWith2D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose2D otherMapPose,
float  maxDistForCorrespondence,
float  maxAngularDistForCorrespondence,
const mrpt::poses::CPose2D angularDistPivotPoint,
mrpt::utils::TMatchingPairList correspondences,
float &  correspondencesRatio,
float *  sumSqrDist = NULL,
bool  onlyKeepTheClosest = false,
bool  onlyUniqueRobust = false 
) const

◆ computeMatchingWith3DLandmarks()

void CLandmarksMap::computeMatchingWith3DLandmarks ( const mrpt::maps::CLandmarksMap otherMap,
mrpt::utils::TMatchingPairList correspondences,
float &  correspondencesRatio,
std::vector< bool > &  otherCorrespondences 
) const

Perform a search for correspondences between "this" and another lansmarks map: In this class, the matching is established solely based on the landmarks' IDs.

Parameters
otherMap[IN] The other map.
correspondences[OUT] The matched pairs between maps.
correspondencesRatio[OUT] This is NumberOfMatchings / NumberOfLandmarksInTheAnotherMap
otherCorrespondences[OUT] Will be returned with a vector containing "true" for the indexes of the other map's landmarks with a correspondence.

Definition at line 1034 of file CLandmarksMap.cpp.

References _mEDD, ASSERT_, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::poses::CPointPDFGaussian::cov, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::vision::featSIFT, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::get(), insertionOptions, landmarks, likelihoodOptions, mrpt::poses::CPointPDFGaussian::mean, MRPT_END, MRPT_START, mrpt::utils::TMatchingPair::other_idx, mrpt::utils::TMatchingPair::other_x, mrpt::utils::TMatchingPair::other_y, mrpt::utils::TMatchingPair::other_z, mrpt::maps::CLandmark::pose_mean, mrpt::maps::CLandmarksMap::TInsertionOptions::SiftEDDThreshold, mrpt::maps::CLandmarksMap::TInsertionOptions::SiftLikelihoodThreshold, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTMatching3DMethod, mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_mahaDist_std, mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFTs_sigma_descriptor_dist, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::size(), mrpt::math::square(), mrpt::utils::TMatchingPair::this_idx, mrpt::utils::TMatchingPair::this_x, mrpt::utils::TMatchingPair::this_y, mrpt::utils::TMatchingPair::this_z, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::math::TPoint3D::x, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.

Referenced by computeMatchingWith2D(), and fuseWith().

◆ computeObservationLikelihood() [1/2]

double CMetricMap::computeObservationLikelihood ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D takenFrom 
)
inherited

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

See: Maps and observations compatibility matrix

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 196 of file CMetricMap.cpp.

Referenced by mrpt::maps::CMultiMetricMapPDF::PF_SLAM_computeObservationLikelihoodForParticle().

◆ computeObservationLikelihood() [2/2]

double CMetricMap::computeObservationLikelihood ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose2D takenFrom 
)
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.

◆ computeObservationsLikelihood()

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

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

See: Maps and observations compatibility matrix

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

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

◆ Create()

static CLandmarksMapPtr mrpt::maps::CLandmarksMap::Create ( )
static

◆ CreateFromMapDefinition()

mrpt::maps::CLandmarksMap * mrpt::maps::CLandmarksMap::CreateFromMapDefinition ( const mrpt::maps::TMetricMapInitializer def)
static

Constructor from a map definition structure: initializes the map and its parameters accordingly.

Definition at line 47 of file CLandmarksMap.cpp.

◆ CreateObject()

static mrpt::utils::CObject* mrpt::maps::CLandmarksMap::CreateObject ( )
static

◆ determineMatching2D()

void CMetricMap::determineMatching2D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose2D otherMapPose,
mrpt::utils::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
virtualinherited

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 in mrpt::maps::COccupancyGridMap2D, mrpt::maps::CPointsMap, mrpt::maps::CMultiMetricMap, and mrpt::maps::CBeaconMap.

Definition at line 132 of file CMetricMap.cpp.

References MRPT_END, MRPT_START, MRPT_UNUSED_PARAM, and THROW_EXCEPTION.

Referenced by mrpt::slam::CICP::ICP_Method_Classic().

◆ determineMatching3D()

void CMetricMap::determineMatching3D ( const mrpt::maps::CMetricMap otherMap,
const mrpt::poses::CPose3D otherMapPose,
mrpt::utils::TMatchingPairList correspondences,
const TMatchingParams params,
TMatchingExtraResults extraResults 
) const
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:

  • 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::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().

◆ duplicate()

virtual mrpt::utils::CObject* mrpt::maps::CLandmarksMap::duplicate ( ) const
virtual

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

Implements mrpt::utils::CObject.

◆ duplicateGetSmartPtr()

mrpt::utils::CObjectPtr 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 162 of file CObject.h.

References mrpt::utils::CObjectPtr.

Referenced by mrpt::obs::CRawlog::addActions(), mrpt::slam::CIncrementalMapPartitioner::addMapFrame(), and mrpt::obs::CRawlog::addObservations().

◆ fuseWith()

void CLandmarksMap::fuseWith ( CLandmarksMap other,
bool  justInsertAllOfThem = false 
)

◆ getAs3DObject()

void CLandmarksMap::getAs3DObject ( mrpt::opengl::CSetOfObjectsPtr &  outObj) const
virtual

◆ getAsSimplePointsMap() [1/2]

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

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

Otherwise, return NULL

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

Definition at line 240 of file maps/CMetricMap.h.

Referenced by mrpt::maps::CPointsMap::compute3DMatchingRatio().

◆ getAsSimplePointsMap() [2/2]

virtual mrpt::maps::CSimplePointsMap* mrpt::maps::CMetricMap::getAsSimplePointsMap ( )
inlinevirtualinherited

◆ getMapMaxID()

mrpt::maps::CLandmark::TLandmarkID CLandmarksMap::getMapMaxID ( )

Definition at line 2367 of file CLandmarksMap.cpp.

References _mapMaxID.

◆ GetRuntimeClass()

virtual const mrpt::utils::TRuntimeClassId* mrpt::maps::CLandmarksMap::GetRuntimeClass ( ) const
virtual

Returns information about the class of an object in runtime.

Reimplemented from mrpt::maps::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 52 of file CObservable.h.

Referenced by mrpt::gui::CWindowDialog::OnMouseDown(), mrpt::gui::CWindowDialog::OnMouseMove(), mrpt::gui::CWindowDialog::OnResize(), and mrpt::opengl::COpenGLViewport::render().

◆ insertObservation()

bool CMetricMap::insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
inherited

Insert the observation information into this map.

This method must be implemented in derived classes. See: Maps and observations compatibility matrix

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

◆ insertObservationPtr()

bool CMetricMap::insertObservationPtr ( const mrpt::obs::CObservationPtr &  obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
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().

◆ internal_clear()

void CLandmarksMap::internal_clear ( )
privatevirtual

Internal method called by clear()

Implements mrpt::maps::CMetricMap.

Definition at line 156 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear(), and landmarks.

◆ internal_computeObservationLikelihood()

double CLandmarksMap::internal_computeObservationLikelihood ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D takenFrom 
)
virtual

Computes the (logarithmic) likelihood that a given observation was taken from a given pose in the world being modeled with this map.

In the current implementation, this method behaves in a different way according to the nature of the observation's class:

  • "mrpt::obs::CObservation2DRangeScan": This calls "computeLikelihood_RSLC_2007".
  • "mrpt::obs::CObservationStereoImages": This calls "computeLikelihood_SIFT_LandmarkMap".
Parameters
takenFromThe robot's pose the observation is supposed to be taken from.
obsThe observation.
Returns
This method returns a likelihood value > 0.
See also
Used in particle filter algorithms, see: CMultiMetricMapPDF::update

Implements mrpt::maps::CMetricMap.

Definition at line 234 of file CLandmarksMap.cpp.

References _mapMaxID, _maxIDUpdated, mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::altitude, mrpt::obs::gnss::Message_NMEA_GGA::content_t::altitude_meters, mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::ang, mrpt::maps::CLandmarksMap::TLikelihoodOptions::beaconRangesStd, mrpt::maps::CLandmarksMap::TLikelihoodOptions::beaconRangesUseObservationStd, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), changeCoordinatesReference(), CLASS_ID, computeLikelihood_RSLC_2007(), computeLikelihood_SIFT_LandmarkMap(), mrpt::poses::CPose3DPDFGaussian::cov, DEG2RAD, mrpt::math::distance(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::distanceTo(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::extRobotPoseStd, mrpt::vision::featBeacon, mrpt::obs::gnss::Message_NMEA_GGA::fields, mrpt::obs::CObservationGPS::getMsgByClass(), mrpt::obs::CObservation::GetRuntimeClass(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::GPS_sigma, mrpt::maps::CLandmarksMap::TLikelihoodOptions::GPSOrigin, mrpt::obs::CObservationGPS::has_GGA_datum, mrpt::maps::CLandmarksMap::TInsertionOptions::insert_Landmarks_from_range_scans, insertionOptions, mrpt::mrpt::math::isNaN(), landmarks, mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::latitude, mrpt::obs::gnss::Message_NMEA_GGA::content_t::latitude_degrees, likelihoodOptions, loadOccupancyFeaturesFrom2DRangeScan(), loadSiftFeaturesFromStereoImageObservation(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::longitude, mrpt::obs::gnss::Message_NMEA_GGA::content_t::longitude_degrees, mrpt::obs::CObservationBeaconRanges::maxSensorDistance, mrpt::poses::CPointPDFGaussian::mean, mrpt::poses::CPose3DPDFGaussian::mean, mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::min_sat, mrpt::obs::CObservationBeaconRanges::minSensorDistance, MRPT_CHECK_NORMAL_NUMBER, MRPT_END, MRPT_START, mrpt::poses::CPose3D::pitch(), mrpt::obs::CObservationRobotPose::pose, mrpt::maps::CLandmarksMap::TLikelihoodOptions::rangeScan2D_decimation, mrpt::poses::CPose3D::roll(), mrpt::obs::gnss::Message_NMEA_GGA::content_t::satellitesUsed, mrpt::obs::CObservationBeaconRanges::sensedData, mrpt::obs::CObservationRobotPose::sensorPose, mrpt::obs::CObservation2DRangeScan::sensorPose, mrpt::maps::CLandmarksMap::TLikelihoodOptions::SIFT_feat_options, size(), mrpt::math::square(), mrpt::obs::CObservationBeaconRanges::stdError, mrpt::math::wrapToPi(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::x_shift, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::y(), mrpt::maps::CLandmarksMap::TLikelihoodOptions::TGPSOrigin::y_shift, and mrpt::poses::CPose3D::yaw().

◆ internal_CreateFromMapDefinition()

mrpt::maps::CMetricMap * CLandmarksMap::internal_CreateFromMapDefinition ( const mrpt::maps::TMetricMapInitializer def)
static

◆ internal_insertObservation()

bool CLandmarksMap::internal_insertObservation ( const mrpt::obs::CObservation obs,
const mrpt::poses::CPose3D robotPose = NULL 
)
privatevirtual

◆ isEmpty()

bool CLandmarksMap::isEmpty ( ) const
virtual

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

Implements mrpt::maps::CMetricMap.

Definition at line 2252 of file CLandmarksMap.cpp.

References size().

◆ loadFromProbabilisticPosesAndObservations()

void CMetricMap::loadFromProbabilisticPosesAndObservations ( const mrpt::maps::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...

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

◆ loadFromSimpleMap()

void mrpt::maps::CMetricMap::loadFromSimpleMap ( const mrpt::maps::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 105 of file maps/CMetricMap.h.

Referenced by mrpt::maps::CRandomFieldGridMap2D::internal_clear().

◆ loadOccupancyFeaturesFrom2DRangeScan()

void CLandmarksMap::loadOccupancyFeaturesFrom2DRangeScan ( const mrpt::obs::CObservation2DRangeScan obs,
const mrpt::poses::CPose3D robotPose = NULL,
unsigned int  downSampleFactor = 1 
)

◆ loadSiftFeaturesFromImageObservation()

void CLandmarksMap::loadSiftFeaturesFromImageObservation ( const mrpt::obs::CObservationImage obs,
const mrpt::vision::CFeatureExtraction::TOptions feat_options = mrpt::vision::CFeatureExtraction::TOptions(mrpt::vision::featSIFT) 
)

Loads into this landmarks map the SIFT features extracted from an image observation (Previous contents of map will be erased) The robot is assumed to be at the origin of the map.

Some options may be applicable from "insertionOptions" (insertionOptions.SIFTsLoadDistanceOfTheMean)

Parameters
feat_optionsOptionally, you can pass here parameters for changing the default SIFT detector settings.

Definition at line 614 of file CLandmarksMap.cpp.

References mrpt::vision::CFeatureList::begin(), mrpt::obs::CObservationImage::cameraParams, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear(), mrpt::poses::CPointPDFGaussian::cov, mrpt::vision::CFeatureExtraction::detectFeatures(), mrpt::vision::CFeatureList::end(), mrpt::maps::CLandmark::features, mrpt::math::generateAxisBaseFromDirection(), mrpt::obs::CObservationImage::image, insertionOptions, mrpt::utils::TCamera::intrinsicParams, landmarks, mrpt::poses::CPointPDFGaussian::mean, mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::norm(), mrpt::maps::CLandmark::normal, mrpt::vision::CFeatureExtraction::options, mrpt::vision::pixelTo3D(), mrpt::maps::CLandmark::pose_cov_11, mrpt::maps::CLandmark::pose_cov_12, mrpt::maps::CLandmark::pose_cov_13, mrpt::maps::CLandmark::pose_cov_22, mrpt::maps::CLandmark::pose_cov_23, mrpt::maps::CLandmark::pose_cov_33, mrpt::maps::CLandmark::pose_mean, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::push_back(), mrpt::maps::CLandmark::seenTimesCount, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTsLoadDistanceOfTheMean, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTsLoadEllipsoidWidth, mrpt::math::square(), mrpt::obs::CObservation::timestamp, mrpt::maps::CLandmark::timestampLastSeen, mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.

Referenced by internal_insertObservation().

◆ loadSiftFeaturesFromStereoImageObservation()

Loads into this landmarks map the SIFT features extracted from an observation consisting of a pair of stereo-image (Previous contents of map will be erased) The robot is assumed to be at the origin of the map.

Some options may be applicable from "insertionOptions"

Parameters
feat_optionsOptionally, you can pass here parameters for changing the default SIFT detector settings.

Definition at line 694 of file CLandmarksMap.cpp.

References mrpt::vision::TStereoSystemParams::baseline, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::obs::CObservationStereoImages::cameraPose, changeCoordinatesReference(), mrpt::vision::TMatchingOptions::EDD_RATIO, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::vision::TMatchingOptions::epipolar_TH, mrpt::obs::CObservationStereoImages::imageLeft, mrpt::obs::CObservationStereoImages::imageRight, insertionOptions, mrpt::utils::TCamera::intrinsicParams, mrpt::vision::TStereoSystemParams::K, landmarks, mrpt::obs::CObservationStereoImages::leftCamera, mrpt::vision::matchFeatures(), mrpt::vision::TMatchingOptions::matching_method, mrpt::vision::TMatchingOptions::maxEDD_TH, mrpt::vision::TStereoSystemParams::maxZ, mrpt::vision::TStereoSystemParams::minZ, mrpt::vision::TMatchingOptions::mmDescriptorSIFT, MRPT_END, MRPT_START, mrpt::maps::CLandmarksMap::TInsertionOptions::PLOT_IMAGES, mrpt::vision::projectMatchedFeatures(), mrpt::obs::CObservationStereoImages::rightCameraPose, mrpt::maps::CLandmarksMap::TInsertionOptions::SiftCorrRatioThreshold, mrpt::maps::CLandmarksMap::TInsertionOptions::SiftEDDThreshold, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_epipolar_TH, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_numberOfKLTKeypoints, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stdDisparity, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stdXY, mrpt::maps::CLandmarksMap::TInsertionOptions::SIFTs_stereo_maxDepth, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::size(), mrpt::vision::TStereoSystemParams::stdDisp, mrpt::vision::TStereoSystemParams::stdPixel, mrpt::obs::CObservation::timestamp, and mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::x().

Referenced by internal_computeObservationLikelihood(), and internal_insertObservation().

◆ MapDefinition()

mrpt::maps::TMetricMapInitializer * mrpt::maps::CLandmarksMap::MapDefinition ( )
static

Returns default map definition initializer.

See mrpt::maps::TMetricMapInitializer

Definition at line 47 of file CLandmarksMap.cpp.

◆ operator delete() [1/3]

void mrpt::maps::CLandmarksMap::operator delete ( void ptr)
throw (
)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator delete() [2/3]

void mrpt::maps::CLandmarksMap::operator delete ( void ptr,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator delete() [3/3]

void mrpt::maps::CLandmarksMap::operator delete ( void memory,
void ptr 
)
throw (
)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator delete[]()

void mrpt::maps::CLandmarksMap::operator delete[] ( void ptr)
throw (
)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator new() [1/3]

static void* mrpt::maps::CLandmarksMap::operator new ( size_t  size,
void ptr 
)
inlinestatic

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator new() [2/3]

void* mrpt::maps::CLandmarksMap::operator new ( size_t  size)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator new() [3/3]

void* mrpt::maps::CLandmarksMap::operator new ( size_t  size,
const std::nothrow_t &   
)
throw (
)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ operator new[]()

void* mrpt::maps::CLandmarksMap::operator new[] ( size_t  size)
inline

Definition at line 62 of file maps/CLandmarksMap.h.

◆ publishEvent()

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

◆ readFromStream()

void CLandmarksMap::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.

Definition at line 197 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::clear(), landmarks, MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::push_back(), and version.

◆ saveMetricMapRepresentationToFile()

void CLandmarksMap::saveMetricMapRepresentationToFile ( const std::string filNamePrefix) const
virtual

This virtual method saves the map to a file "filNamePrefix"+< some_file_extension >, as an image or in any other applicable way (Notice that other methods to save the map may be implemented in classes implementing this virtual interface).

In the case of this class, these files are generated:

  • "filNamePrefix"+"_3D.m": A script for MATLAB for drawing landmarks as 3D ellipses.
  • "filNamePrefix"+"_3D.3DScene": A 3D scene with a "ground plane grid" and the set of ellipsoids in 3D.

Implements mrpt::maps::CMetricMap.

Definition at line 2311 of file CLandmarksMap.cpp.

References mrpt::opengl::CSetOfObjects::Create(), mrpt::opengl::CGridPlaneXY::Create(), getAs3DObject(), mrpt::opengl::COpenGLScene::insert(), MRPT_END, MRPT_START, and saveToMATLABScript3D().

◆ saveToMATLABScript2D()

bool CLandmarksMap::saveToMATLABScript2D ( std::string  file,
const char *  style = "b",
float  stdCount = 2.0f 
)

Save to a MATLAB script which displays 2D error ellipses for the map (top-view, projection on the XY plane).

Parameters
fileThe name of the file to save the script to.
styleThe MATLAB-like string for the style of the lines (see 'help plot' in MATLAB for posibilities)
stdCountThe ellipsoids will be drawn from the center to "stdCount" times the "standard deviations". (default is 2std = 95% confidence intervals)
Returns
Returns false if any error occured, true elsewere.

Definition at line 1397 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::math::cov(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::system::os::fclose(), mrpt::system::os::fopen(), mrpt::system::os::fprintf(), landmarks, and M_2PI.

◆ saveToMATLABScript3D()

bool CLandmarksMap::saveToMATLABScript3D ( std::string  file,
const char *  style = "b",
float  confInterval = 0.95f 
) const

Save to a MATLAB script which displays 3D error ellipses for the map.

Parameters
fileThe name of the file to save the script to.
styleThe MATLAB-like string for the style of the lines (see 'help plot' in MATLAB for posibilities)
stdCountThe ellipsoids will be drawn from the center to a given confidence interval in [0,1], e.g. 2 sigmas=0.95 (default is 2std = 0.95 confidence intervals)
Returns
Returns false if any error occured, true elsewere.

Definition at line 1355 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::system::os::fclose(), mrpt::system::os::fopen(), mrpt::system::os::fprintf(), and landmarks.

Referenced by saveMetricMapRepresentationToFile().

◆ saveToTextFile()

bool CLandmarksMap::saveToTextFile ( std::string  file)

Save to a text file.

In line "i" there are the (x,y,z) mean values of the i'th landmark + type of landmark + # times seen + timestamp + RGB/descriptor + ID

Returns false if any error occured, true elsewere.

Definition at line 1310 of file CLandmarksMap.cpp.

References ASSERT_, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::system::extractDayTimeFromTimestamp(), mrpt::system::os::fclose(), mrpt::vision::featSIFT, mrpt::system::os::fopen(), mrpt::system::os::fprintf(), INVALID_TIMESTAMP, landmarks, MRPT_END, and MRPT_START.

◆ simulateBeaconReadings()

void CLandmarksMap::simulateBeaconReadings ( const mrpt::poses::CPose3D in_robotPose,
const mrpt::poses::CPoint3D in_sensorLocationOnRobot,
mrpt::obs::CObservationBeaconRanges out_Observations 
) const

Simulates a noisy reading toward each of the beacons in the landmarks map, if any.

Parameters
in_robotPoseThis robot pose is used to simulate the ranges to each beacon.
in_sensorLocationOnRobotThe 3D position of the sensor on the robot
out_ObservationsThe results will be stored here. NOTICE that the fields "CObservationBeaconRanges::minSensorDistance","CObservationBeaconRanges::maxSensorDistance" and "CObservationBeaconRanges::stdError" MUST BE FILLED OUT before calling this function. An observation will be generated for each beacon in the map, but notice that some of them may be missed if out of the sensor maximum range.

Definition at line 2260 of file CLandmarksMap.cpp.

References mrpt::obs::CObservationBeaconRanges::TMeasurement::beaconID, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::poses::CPoseOrPoint< DERIVEDCLASS >::distanceTo(), mrpt::random::CRandomGenerator::drawGaussian1D_normalized(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::vision::featBeacon, mrpt::system::getCurrentTime(), landmarks, mrpt::obs::CObservationBeaconRanges::maxSensorDistance, mrpt::poses::CPointPDFGaussian::mean, mrpt::obs::CObservationBeaconRanges::minSensorDistance, mrpt::random::randomGenerator, mrpt::obs::CObservationBeaconRanges::sensedData, mrpt::obs::CObservationBeaconRanges::TMeasurement::sensedDistance, mrpt::obs::CObservationBeaconRanges::TMeasurement::sensorLocationOnRobot, mrpt::obs::CObservationBeaconRanges::stdError, and mrpt::obs::CObservation::timestamp.

◆ simulateRangeBearingReadings()

void CLandmarksMap::simulateRangeBearingReadings ( const mrpt::poses::CPose3D robotPose,
const mrpt::poses::CPose3D sensorLocationOnRobot,
mrpt::obs::CObservationBearingRange observations,
bool  sensorDetectsIDs = true,
const float  stdRange = 0.01f,
const float  stdYaw = mrpt::utils::DEG2RAD(0.1f),
const float  stdPitch = mrpt::utils::DEG2RAD(0.1f),
vector_size_t real_associations = NULL,
const double  spurious_count_mean = 0,
const double  spurious_count_std = 0 
) const

Simulates a noisy bearing-range observation of all the beacons (landamrks with type glBeacon) in the landmarks map, if any.

Parameters
[in]robotPoseThe robot pose.
[in]sensorLocationOnRobotThe 3D position of the sensor on the robot
[out]observationsThe results will be stored here.
[in]sensorDetectsIDsIf this is set to false, all the landmarks will be sensed with INVALID_LANDMARK_ID as ID.
[in]stdRangeThe sigma of the sensor noise in range (meters).
[in]stdYawThe sigma of the sensor noise in yaw (radians).
[in]stdPitchThe sigma of the sensor noise in pitch (radians).
[out]real_associationsIf it's not a NULL pointer, this will contain at the return the real indices of the landmarks in the map in the same order than they appear in out_Observations. Useful when sensorDetectsIDs=false. Spurious readings are assigned a std::string::npos (=-1) index.
[in]spurious_count_meanThe mean number of spurious measurements (uniformly distributed in range & angle) to generate. The number of spurious is generated by rounding a random Gaussin number. If both this mean and the std are zero (the default) no spurious readings are generated.
[in]spurious_count_stdRead spurious_count_mean above.
Note
The fields "CObservationBearingRange::fieldOfView_*","CObservationBearingRange::maxSensorDistance" and "CObservationBearingRange::minSensorDistance" MUST BE FILLED OUT before calling this function.
At output, the observation will have CObservationBearingRange::validCovariances set to "false" and the 3 sensor_std_* members correctly set to their values. An observation will be generated for each beacon in the map, but notice that some of them may be missed if out of the sensor maximum range or field of view-

Definition at line 2537 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::random::CRandomGenerator::drawGaussian1D(), mrpt::random::CRandomGenerator::drawGaussian1D_normalized(), mrpt::random::CRandomGenerator::drawUniform(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), mrpt::obs::CObservationBearingRange::fieldOfView_pitch, mrpt::obs::CObservationBearingRange::fieldOfView_yaw, mrpt::system::getCurrentTime(), INVALID_LANDMARK_ID, mrpt::obs::CObservationBearingRange::TMeasurement::landmarkID, landmarks, mrpt::obs::CObservationBearingRange::maxSensorDistance, mrpt::poses::CPointPDFGaussian::mean, mrpt::obs::CObservationBearingRange::minSensorDistance, mrpt::obs::CObservationBearingRange::TMeasurement::pitch, mrpt::obs::gnss::pitch, mrpt::random::randomGenerator, mrpt::obs::CObservationBearingRange::TMeasurement::range, mrpt::utils::round_long(), mrpt::obs::CObservationBearingRange::sensedData, mrpt::obs::CObservationBearingRange::sensor_std_pitch, mrpt::obs::CObservationBearingRange::sensor_std_range, mrpt::obs::CObservationBearingRange::sensor_std_yaw, mrpt::obs::CObservationBearingRange::sensorLocationOnRobot, mrpt::poses::CPose3D::sphericalCoordinates(), mrpt::obs::CObservation::timestamp, mrpt::obs::CObservationBearingRange::validCovariances, mrpt::math::wrapToPi(), and mrpt::obs::CObservationBearingRange::TMeasurement::yaw.

◆ size()

size_t CLandmarksMap::size ( ) const

◆ squareDistanceToClosestCorrespondence()

float CMetricMap::squareDistanceToClosestCorrespondence ( float  x0,
float  y0 
) const
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.

◆ writeToMatlab()

virtual mxArray* mrpt::utils::CSerializable::writeToMatlab ( ) const
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.

Returns
A new 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.

◆ writeToStream()

void CLandmarksMap::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.

Definition at line 174 of file CLandmarksMap.cpp.

References mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::begin(), mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::end(), landmarks, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::size(), and version.

Member Data Documentation

◆ _init_CLandmarksMap

mrpt::utils::CLASSINIT mrpt::maps::CLandmarksMap::_init_CLandmarksMap
staticprotected

Definition at line 62 of file maps/CLandmarksMap.h.

◆ _mapMaxID

mrpt::maps::CLandmark::TLandmarkID CLandmarksMap::_mapMaxID
static

◆ _maxIDUpdated

bool CLandmarksMap::_maxIDUpdated = false
static

◆ _mEDD

std::map< std::pair< mrpt::maps::CLandmark::TLandmarkID, mrpt::maps::CLandmark::TLandmarkID >, double > CLandmarksMap::_mEDD
static

Map of the Euclidean Distance between the descriptors of two SIFT-based landmarks.

Definition at line 166 of file maps/CLandmarksMap.h.

Referenced by auxParticleFilterCleanUp(), computeLikelihood_SIFT_LandmarkMap(), and computeMatchingWith3DLandmarks().

◆ classCLandmarksMap

mrpt::utils::TRuntimeClassId mrpt::maps::CLandmarksMap::classCLandmarksMap
static

Definition at line 62 of file maps/CLandmarksMap.h.

◆ classCMetricMap

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

Definition at line 57 of file maps/CMetricMap.h.

◆ classCObject

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

Definition at line 118 of file CObject.h.

◆ classCSerializable

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

Definition at line 42 of file CSerializable.h.

◆ classinfo

const mrpt::utils::TRuntimeClassId* mrpt::maps::CLandmarksMap::classinfo
static

Definition at line 62 of file maps/CLandmarksMap.h.

◆ COLOR_LANDMARKS_IN_3DSCENES

mrpt::utils::TColorf mrpt::maps::CLandmarksMap::COLOR_LANDMARKS_IN_3DSCENES
static

The color of landmark ellipsoids in CLandmarksMap::getAs3DObject.

Definition at line 85 of file maps/CLandmarksMap.h.

◆ fuseOptions

struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TFuseOptions mrpt::maps::CLandmarksMap::fuseOptions

Referenced by fuseWith().

◆ genericMapParams

TMapGenericParams mrpt::maps::CMetricMap::genericMapParams
inherited

◆ insertionOptions

mrpt::maps::CLandmarksMap::TInsertionOptions mrpt::maps::CLandmarksMap::insertionOptions

◆ insertionResults

struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TInsertionResults mrpt::maps::CLandmarksMap::insertionResults

◆ landmarks

struct VISION_IMPEXP mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks mrpt::maps::CLandmarksMap::landmarks

◆ likelihoodOptions

mrpt::maps::CLandmarksMap::TLikelihoodOptions mrpt::maps::CLandmarksMap::likelihoodOptions

◆ m_private_map_register_id

const size_t mrpt::maps::CLandmarksMap::m_private_map_register_id = mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister( "CLandmarksMap,landmarksMap" ,& mrpt::maps::CLandmarksMap ::MapDefinition,& mrpt::maps::CLandmarksMap ::internal_CreateFromMapDefinition)
static

ID used to initialize class registration (just ignore it)

Definition at line 545 of file maps/CLandmarksMap.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020